angle_to#

Vector.angle_to(other)[source]#

Calculate the angle to vector other.

Calculates \(\arccos\vec{v}_1 \cdot \vec{v}_2 / (v_1 v_2)\).

Parameters:
otherVector or VectorArray
Returns:
anglefloat or ndarray

The angle(s) in rad within [0, π].

If other is type Vector, returns float.

If other is type VectorArray, returns ndarray.