Rename variables used inside `findFurthest()`
@@ -118,16 +118,16 @@ public final class Geometry{
}
public static <T extends Position> T findFurthest(float x, float y, Iterable<T> list){
- T closest = null;
- float cdist = 0f;
+ T furthest = null;
+ float fdist = 0f;
for(T t : list){
float dst = t.dst(x, y);
- if(closest == null || dst > cdist){
- closest = t;
- cdist = dst;
+ if(furthest == null || dst > fdist){
+ furthest = t;
+ fdist = dst;
}
}
- return closest;
+ return furthest;
}
public static Vec2[] pixelCircle(float tindex){
