Replaced sqrt(x**2+y**2) with hypot in Mapping/gaussian_grid_map/gaussian_grid_map.py

This commit is contained in:
Guillaume Jacquenot
2019-12-07 22:53:07 +01:00
parent e467f4fad1
commit ccf047135e

View File

@@ -31,7 +31,7 @@ def generate_gaussian_grid_map(ox, oy, xyreso, std):
# Search minimum distance
mindis = float("inf")
for (iox, ioy) in zip(ox, oy):
d = math.sqrt((iox - x)**2 + (ioy - y)**2)
d = math.hypot(iox - x, ioy - y)
if mindis >= d:
mindis = d