Skip to content

Commit ccf0471

Browse files
committed
Replaced sqrt(x**2+y**2) with hypot in Mapping/gaussian_grid_map/gaussian_grid_map.py
1 parent e467f4f commit ccf0471

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Mapping/gaussian_grid_map/gaussian_grid_map.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def generate_gaussian_grid_map(ox, oy, xyreso, std):
3131
# Search minimum distance
3232
mindis = float("inf")
3333
for (iox, ioy) in zip(ox, oy):
34-
d = math.sqrt((iox - x)**2 + (ioy - y)**2)
34+
d = math.hypot(iox - x, ioy - y)
3535
if mindis >= d:
3636
mindis = d
3737

0 commit comments

Comments
 (0)