mirror of
https://github.com/AtsushiSakai/PythonRobotics.git
synced 2026-04-22 03:00:22 -04:00
Replaced sqrt(x**2+y**2) with hypot in Mapping/rectangle_fitting/rectangle_fitting.py
This commit is contained in:
@@ -162,7 +162,7 @@ class LShapeFitting():
|
||||
C = set()
|
||||
R = self.R0 + self.Rd * np.linalg.norm([ox[i], oy[i]])
|
||||
for j, _ in enumerate(ox):
|
||||
d = np.sqrt((ox[i] - ox[j])**2 + (oy[i] - oy[j])**2)
|
||||
d = np.hypot(ox[i] - ox[j], oy[i] - oy[j])
|
||||
if d <= R:
|
||||
C.add(j)
|
||||
S.append(C)
|
||||
|
||||
Reference in New Issue
Block a user