Skip to content

Commit 738c2b7

Browse files
committed
Remove extra spaces
1 parent b6a917f commit 738c2b7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

astar.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,15 @@ var astar = {
134134
// See list of heuristics: http://theory.stanford.edu/~amitp/GameProgramming/Heuristics.html
135135
heuristics: {
136136
manhattan: function(pos0, pos1) {
137-
var d1 = Math.abs (pos1.x - pos0.x);
138-
var d2 = Math.abs (pos1.y - pos0.y);
137+
var d1 = Math.abs(pos1.x - pos0.x);
138+
var d2 = Math.abs(pos1.y - pos0.y);
139139
return d1 + d2;
140140
},
141141
diagonal: function(pos0, pos1) {
142142
var D = 1;
143143
var D2 = Math.sqrt(2);
144-
var d1 = Math.abs (pos1.x - pos0.x);
145-
var d2 = Math.abs (pos1.y - pos0.y);
144+
var d1 = Math.abs(pos1.x - pos0.x);
145+
var d2 = Math.abs(pos1.y - pos0.y);
146146
return (D * (d1 + d2)) + ((D2 - (2 * D)) * Math.min(d1, d2));
147147
}
148148
}

0 commit comments

Comments
 (0)