Skip to main content

sincosd_diff

Function sincosd_diff 

Source
pub fn sincosd_diff<T>(
    a: Degrees<T>,
    b: Degrees<T>,
) -> (UnitNegRange<T>, UnitNegRange<T>)
where T: Float + FloatConst, f64: From<T>,
Expand description

Calculate the sine and cosine of an angle from the difference of a pair of values in Degrees.

Note: calculates the cosine of the angle from its sine and overrides the sine and cosine for ±30° and ±45° to their correct values.

  • a, b the angles in Degrees

returns sine and cosine of a - b as UnitNegRanges.

§Panics

Panics if it cannot convert value to Float.