Skip to content

Commit

Permalink
Incorrect comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Jan 19, 2019
1 parent e61af2d commit d7aab0a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public Location apply(NPC npc) {
double minDist = Double.MAX_VALUE;
for (Location centre : regionCentres) {
double d = centre.distanceSquared(npc.getStoredLocation());
if (d > minDist) {
if (d < minDist) {
minDist = d;
closestCentre = centre;
}
Expand Down

0 comments on commit d7aab0a

Please sign in to comment.