Fix bug where distance would be too close to 0 to register

the furthest_distance now starts at -1 instead of 0 - if there's a point with a distance of 0, that's fine.

This caused issues in the circle previously.
This commit is contained in:
karl 2020-11-29 01:01:03 +01:00
parent 1e9511a3ac
commit b9fd11ca0d

View File

@ -63,7 +63,7 @@ private:
// Find the point which is furthest away from the line, add it to the output
Point furthest_point;
float furthest_distance = 0.0;
float furthest_distance = -1.0;
for (const Point &point : input)
{