Expand description
Lookup-table trigonometry.
Alternative to crate::fast_math’s polynomial approximations: a
256-entry sin table (1KB), computed at compile time via a Taylor-series
const fn so no runtime initialization is needed. Trades accuracy
(~2% error) for speed on cores without hardware sin/cos or an FPU.
Functions§
- fast_
cos_ i16 - Fast cosine using the lookup table (cos(x) = sin(x + pi/2)).
- fast_
sin_ i16 - Fast sine using the lookup table.