From 97ada9c2fffeeec313fa16002c459528520832bb Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Tue, 9 Jul 2019 06:01:10 +0000 Subject: [PATCH] Fix diagonal cost --- LayoutLink.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LayoutLink.js b/LayoutLink.js index c4d3361..c2ee121 100644 --- a/LayoutLink.js +++ b/LayoutLink.js @@ -154,7 +154,7 @@ class LayoutLink { ]; if (offset[0] != 0 && offset[1] != 0) { // Diagonal; approximate sqrt(2) from distance formula - cost += 0.5; + cost += 0.4; } return cost;