Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Corrected the hinted return type for :func:`angle_between_vectors` (#3189)

Phoenix2157f2f428f8761b
diff --git a/manim/utils/space_ops.py b/manim/utils/space_ops.py
index 203462057..1d8fba6d3 100644
--- a/manim/utils/space_ops.py
+++ b/manim/utils/space_ops.py
@@ -324,7 +324,7 @@ def angle_of_vector(vector: Sequence[float] | np.ndarray) -> float:
return np.angle(complex(*vector[:2]))
-def angle_between_vectors(v1: np.ndarray, v2: np.ndarray) -> np.ndarray:
+def angle_between_vectors(v1: np.ndarray, v2: np.ndarray) -> float:
"""Returns the angle between two vectors.
This angle will always be between 0 and pi
@@ -337,7 +337,7 @@ def angle_between_vectors(v1: np.ndarray, v2: np.ndarray) -> np.ndarray:
Returns
-------
- np.ndarray
+ float
The angle between the vectors.
"""