pub fn cossin(phase: i32) -> (i32, i32)
Expand description
Compute the cosine and sine of an angle. This is ported from the MiSoC cossin core. https://github.com/m-labs/misoc/blob/master/misoc/cores/cossin.py
§Arguments
phase
- 32-bit phase wherei32::MIN
is -π andi32::MAX
is π
§Returns
The cos and sin values of the provided phase as a (i32, i32)
tuple. With a 7-bit deep LUT there is 9e-6 max and 4e-6 RMS error
in each quadrature over 20 bit phase.