wavegen-rs
wavegen-rs copied to clipboard
Waveform generator library written in Rust
Updates the requirements on [criterion](https://github.com/bheisler/criterion.rs) to permit the latest version. Changelog Sourced from criterion's changelog. [0.5.0] - 2023-05-23 Changed Replaced lazy_static dependency with once_cell Improved documentation of the html_reports feature...
This code currently panics, the calculated bias is `-0.00999999977` ```rust let wf = Waveform::::with_components(100.0, vec![sawtooth!(1)]); let bias = wf.iter().take(100).sum::() / 100.0; assert!(approx_eq!(f32, bias, 0.0, epsilon = 1e-3)); ```
Examples should contain a spectrum plotting for reference/educational purposes. Possibly implement it with `rustfft` or a wrapper over it like `spectrum-analyzer`
Right now, it can only generate a symmetrical square, with 50% duty cycle. TODO: * implement duty cycle in `_square` function * update `square!` macros to allow for new attribute