[][src]Function acap::cos::prenorm_angular_distance

pub fn prenorm_angular_distance<T, U>(x: T, y: U) -> AngularDistance<T::Value> where
    T: Coordinates,
    U: Coordinates<Value = T::Value>,
    T::Value: Real

Compute the angular distance between two points.

\begin{aligned}
\mathrm{prenorm\_angular\_distance}(x, y) &= \arccos(\mathrm{prenorm\_cosine\_similarity}(x, y)) \\
&= \arccos(x \cdot y) \\
&= \arccos \left( \sum_i x_i y_i \right) \\
&= \theta
\end{aligned}