Use our own hypot() for older Python support

This commit is contained in:
2021-04-28 07:12:30 +00:00
parent af9cc4b546
commit aec057c89c
23 changed files with 28 additions and 28 deletions
+1 -2
View File
@@ -1,7 +1,6 @@
import importlib
import functools
import time
from math import hypot, sqrt
from astar import AStar
@@ -306,7 +305,7 @@ class Pathfinder(AStar):
def distance_between(self, n1, n2):
(x1, y1, z1) = n1
(x2, y2, z2) = n2
return hypot(x2-x1, y2-y1, z2-z1)
return utils.hypot(x2-x1, y2-y1, z2-z1)
def heuristic_cost_estimate(self, n1, n2):
(x1, y1, z1) = n1