spitfire05/wavegen-rs

Default Sawtooth has suspiciously high amount of bias

Opened this issue · 0 comments

This code currently panics, the calculated bias is -0.00999999977

let wf = Waveform::<f32>::with_components(100.0, vec![sawtooth!(1)]);
let bias = wf.iter().take(100).sum::<f32>() / 100.0;
assert!(approx_eq!(f32, bias, 0.0, epsilon = 1e-3));