Closed gagarski closed 4 years ago
It seems like choosing the point furthest from center to calculate the radius in circleByDiameter
solves the problem, however this is quite confusing: both points should have the same distance to center.
As an alternative solution, see also #68 (lesson8.task1.Hex). I suggest just to reject the issue, so the students who do not want to struggle with Doubles could struggle with Hexes instead. Or you can add explicit hints about consistency you suggest above. // cc @gagarski
I'm closing this issue as "unclear".
The root of the problem is that
circleByDiameter
does not alwayscontains
diameter.begin
anddiameter.end
.This can create two bad situations in
minContainingCircle
:circleByDiameter
is not chosen as minimal because it does not containdiameter.begin
anddiameter.end
, though it should be minimaldiameter.begin
anddiameter.end
fromcontains
check we actually get the minimal circle but it does not contain all thepoints
in terms ofCircle.contains
I honestly do not know how to solve it. One way would be to implement #68. The other would be to add explicit hints about consistency for
contains
andminContainingCircle
.