From b9fd11ca0d65258a09d3f651718f14b7d1a05826 Mon Sep 17 00:00:00 2001 From: karl Date: Sun, 29 Nov 2020 01:01:03 +0100 Subject: [PATCH] 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. --- Quickhull.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Quickhull.h b/Quickhull.h index ef4b029..c61d0db 100644 --- a/Quickhull.h +++ b/Quickhull.h @@ -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) {