angle_sc::trig

Function sincos

Source
pub fn sincos(radians: Radians) -> (UnitNegRange, UnitNegRange)
Expand description

Calculate the sine and cosine of an angle from a value in Radians.

Note: calculates the cosine of the angle from its sine and overrides both the sine and cosine for π/4 to their correct values: 1/√2

  • radians the angle in Radians

returns sine and cosine of the angle as UnitNegRanges.