Function delta

Source
pub fn delta(from_angle: Angle, to_angle: Angle) -> Angle
Expand description

Gives the ▲-angle between from and to angles (shortest path)

Sign of the returned angle denotes direction, positive means counterClockwise 🔄

§Examples

use std::f64::consts::PI;

use kcl_lib::std::utils::Angle;

assert_eq!(
    Angle::delta(Angle::from_radians(PI / 8.0), Angle::from_radians(PI / 4.0)),
    Angle::from_radians(PI / 8.0)
);