angle_sc::trig

Function cosine_sum

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

Calculate the cosine of the sum 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)