mirror of
https://github.com/AtsushiSakai/PythonRobotics.git
synced 2026-01-13 02:28:03 -05:00
Replaced sqrt(x**2+y**2) with hypot in PathPlanning/GridBasedSweepCPP/grid_based_sweep_coverage_path_planner.py
This commit is contained in:
@@ -118,7 +118,7 @@ def find_sweep_direction_and_start_posi(ox, oy):
|
||||
for i in range(len(ox) - 1):
|
||||
dx = ox[i + 1] - ox[i]
|
||||
dy = oy[i + 1] - oy[i]
|
||||
d = np.sqrt(dx ** 2 + dy ** 2)
|
||||
d = np.hypot(dx, dy)
|
||||
|
||||
if d > max_dist:
|
||||
max_dist = d
|
||||
|
||||
Reference in New Issue
Block a user