pyrobopath.tools.linalg.angle_between#

pyrobopath.tools.linalg.angle_between(v1: ndarray[tuple[Any, ...], dtype[_ScalarT]], v2: ndarray[tuple[Any, ...], dtype[_ScalarT]]) float[source]#

Compute the angle between two 3D vectors

Uses the arccosine of the dot product of unit vectors

Parameters:
  • v1 (NDArray) – the first 3D vector

  • v2 (NDArray) – the second 3D vector

Returns:

the angle between v1 and v2 in radians

Return type:

float