Expand description
A faster implementation of cosine. It’s not that much faster than Rust’s built in cosine function. But YMMV.
Don’t forget to call init_cos_tab before using this!
use synfx_dsp::*;
init_cos_tab(); // Once on process initialization.
// ...
assert!((fast_cos(std::f32::consts::PI) - -1.0).abs() < 0.001);