diff --git a/src/localmaps/StrattonHallF3.localmap b/src/localmaps/StrattonHallF3.localmap index 449473d..93b3da0 100644 Binary files a/src/localmaps/StrattonHallF3.localmap and b/src/localmaps/StrattonHallF3.localmap differ diff --git a/src/main/MapNode.java b/src/main/MapNode.java index 3391950..4ccbb7a 100644 --- a/src/main/MapNode.java +++ b/src/main/MapNode.java @@ -93,10 +93,10 @@ public double calculateAngle(MapNode nextNode) { */ public int calcDistance(MapNode toNode) { double distance = 0; - double distanceXLeg = toNode.getXPos() - this.getXPos(); - double distanceYLeg = toNode.getYPos() - this.getYPos(); + double distanceXLeg = (toNode.getXPos() - this.getXPos()); + double distanceYLeg = (toNode.getYPos() - this.getYPos()); - distance = Math.sqrt((distanceXLeg * distanceXLeg) + (distanceYLeg * distanceYLeg)); + distance = (Math.sqrt((distanceXLeg * distanceXLeg) + (distanceYLeg * distanceYLeg)))/5; distance = Math.round(distance); return (int)distance; }