Skip to content

Commit

Permalink
feat: fix euclidean heuristic
Browse files Browse the repository at this point in the history
  • Loading branch information
auspham committed Jan 5, 2024
1 parent 1b2f3d1 commit ee57000
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/heuristics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class Heuristics {

private functions: Object = {
EUCLIDEAN: (a: Node, b: Node) => {
Math.hypot(a.row - b.row, a.col - b.col);
return Math.hypot(a.row - b.row, a.col - b.col);
},
MANHATTAN: (a: Node, b: Node) => {
let dx = Math.abs(a.col - b.col);
Expand Down

0 comments on commit ee57000

Please sign in to comment.