diff --git a/arc-core/src/arc/math/geom/Geometry.java b/arc-core/src/arc/math/geom/Geometry.java index 7d0228d7..0372aa12 100644 --- a/arc-core/src/arc/math/geom/Geometry.java +++ b/arc-core/src/arc/math/geom/Geometry.java @@ -91,7 +91,7 @@ public static <T extends Position> T findClosest(float x, float y, T[] list){ T closest = null; float cdist = 0f; for(T t : list){ - float dst = t.dst(x, y); + float dst = t.dst2(x, y); if(closest == null || dst < cdist){ closest = t; cdist = dst; @@ -104,7 +104,7 @@ public static <T extends Position> T findClosest(float x, float y, Iterable<T> l T closest = null; float cdist = 0f; for(T t : list){ - float dst = t.dst(x, y); + float dst = t.dst2(x, y); if(closest == null || dst < cdist){ closest = t; cdist = dst; @@ -117,7 +117,7 @@ public static <T extends Position> T findFurthest(float x, float y, Iterable<T> T furthest = null; float fdist = 0f; for(T t : list){ - float dst = t.dst(x, y); + float dst = t.dst2(x, y); if(furthest == null || dst > fdist){ furthest = t; fdist = dst;