diff options
Diffstat (limited to 'Algorithms/Part-I/5-KdTrees/PointSET.java')
-rw-r--r-- | Algorithms/Part-I/5-KdTrees/PointSET.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Algorithms/Part-I/5-KdTrees/PointSET.java b/Algorithms/Part-I/5-KdTrees/PointSET.java index f5594de..5500512 100644 --- a/Algorithms/Part-I/5-KdTrees/PointSET.java +++ b/Algorithms/Part-I/5-KdTrees/PointSET.java @@ -61,7 +61,7 @@ public class PointSET double d = Double.MAX_VALUE; for (Point2D o : set) { - double d2 = p.distanceTo(o); + double d2 = p.distanceSquaredTo(o); if (d2 < d) { d = d2; p0 = o; |