Skip to main content

angle_difference

Function angle_difference 

Source
pub fn angle_difference(from: f64, to: f64) -> f64
Expand description

The signed shortest rotation from from to to, in [-pi, pi).

A half turn is reported as -pi, so the result is deterministic for antipodal angles.