8000 Actually used project function · george0407/spatialmath-python@48ff72a · GitHub
[go: up one dir, main page]

Skip to content

Commit 48ff72a

Browse files
committed
Actually used project function
1 parent f4ebcb6 commit 48ff72a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spatialmath/base/vectors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ def orthogonalize(v1: ArrayLike3, v2: ArrayLike3, normalize: bool = True) -> Arr
817817
:return: nearest vector to v1 that is orthoginal to v2
818818
:rtype: ndarray(n)
819819
"""
820-
v_orth = v1 - np.dot(v1, v2) * v2
820+
v_orth = v1 - project(v1, v2)
821821
if normalize:
822822
v_orth = v_orth / np.linalg.norm(v_orth)
823823
return v_orth

0 commit comments

Comments
 (0)
0