pub fn square_wave(t: &[f64], duty: f64) -> Vec<f64>
A square wave of period 2π: +1 for the first duty · 2π, −1 after (SciPy’s square).
2π
duty · 2π
square