Skip to main content

angular_distance

Function angular_distance 

Source
pub fn angular_distance<T: Float>(
    angles1: &[T],
    angles2: &[T],
) -> Result<T, IncompatiblePointsError>
Expand description

Computes the distance between the points angles1 and angles2 on the unit n-sphere, where n is the length of angles1 and angles2.

The last element of angles1 and angles2 is assumed to be in [0, 2pi] or [-pi, pi] (and the other elements are in [0, pi]). An IncompatiblePointsError is returned when angles1 and angles2 have different lengths.