Struct iq_osc::IQOsc
[−]
[src]
pub struct IQOsc<T: Float> { /* fields omitted */ }
Quadrature oscillator with current phase Φ(t) and phase step ω.
Methods
impl<T: Float> IQOsc<T>
[src]
fn new(phase: T, step: T) -> Self
[src]
Create a new IQOsc
starting at the given initial phase θ0 (in
radians) and with the given phase step ω (in radians).
The first call to next()
will then return (sin θ0, cos
θ0).
fn set_step(&mut self, step: T)
[src]
Change the phase step to the given ω (in radians).
fn set_phase(&mut self, phase: T)
[src]
Change the current phase to the given θ (in radians).
fn next(&mut self) -> (T, T)
[src]
Step the phase to Φ(t+1) and return (sin Φ(t), cos Φ(t)).