angle_sc::trig

Function cosine_diff

Source
pub fn cosine_diff(
    sin_a: UnitNegRange,
    cos_a: UnitNegRange,
    sin_b: UnitNegRange,
    cos_b: UnitNegRange,
) -> UnitNegRange
Expand description

Calculate the cosine of the difference of two angles: a - b.

See: angle sum and difference identities.

  • sin_a, cos_a the sine and cosine of angle a.
  • sin_b, cos_b the sine and cosine of angle b.

return cos(a - b)