Skip to content

Commit

Permalink
Added in Scale Factor on distance.
Browse files Browse the repository at this point in the history
  • Loading branch information
ngigliotti committed Nov 18, 2015
1 parent 9554d94 commit e06d1d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Binary file modified src/localmaps/StrattonHallF3.localmap
Binary file not shown.
6 changes: 3 additions & 3 deletions src/main/MapNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit e06d1d1

Please sign in to comment.