From 367c2c6dc635644b3fa37b5f921b3ebabb1e97c8 Mon Sep 17 00:00:00 2001 From: Guillaume Jacquenot Date: Sat, 7 Dec 2019 22:53:08 +0100 Subject: [PATCH] Replaced sqrt(x**2+y**2) with hypot in PathPlanning/DubinsPath/dubins_path_planning.py --- PathPlanning/DubinsPath/dubins_path_planning.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PathPlanning/DubinsPath/dubins_path_planning.py b/PathPlanning/DubinsPath/dubins_path_planning.py index 706b5a49..96c9c8e4 100644 --- a/PathPlanning/DubinsPath/dubins_path_planning.py +++ b/PathPlanning/DubinsPath/dubins_path_planning.py @@ -141,7 +141,7 @@ def dubins_path_planning_from_origin(ex, ey, eyaw, c, D_ANGLE): # normalize dx = ex dy = ey - D = math.sqrt(dx ** 2.0 + dy ** 2.0) + D = math.hypot(dx, dy) d = D * c # print(dx, dy, D, d)