Skip to content

Commit 367c2c6

Browse files
committed
Replaced sqrt(x**2+y**2) with hypot in PathPlanning/DubinsPath/dubins_path_planning.py
1 parent 4c6fe30 commit 367c2c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

PathPlanning/DubinsPath/dubins_path_planning.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def dubins_path_planning_from_origin(ex, ey, eyaw, c, D_ANGLE):
141141
# normalize
142142
dx = ex
143143
dy = ey
144-
D = math.sqrt(dx ** 2.0 + dy ** 2.0)
144+
D = math.hypot(dx, dy)
145145
d = D * c
146146
# print(dx, dy, D, d)
147147

0 commit comments

Comments
 (0)