performance enhancement.

This commit is contained in:
=
2014-09-12 17:54:41 -07:00
parent da0042671e
commit aa5cb1f2f7
2 changed files with 11 additions and 6 deletions

View File

@@ -65,6 +65,7 @@
(conj path (from-scale current-node))
(came-from (vec current-node))))))))
(def d2 ^double (- (Math/sqrt 2) 2))
(defn heuristic ^long [^long goal-x ^long goal-y ^long current-x ^long current-y]
(let [dist-x (if (< goal-x current-x)