Struct dsp::signal::Phase
[−]
[src]
pub struct Phase<S> { // some fields omitted }
An iterator that yields a phase, useful for waveforms like Sine or Saw.
Methods
impl<S> Phase<S> where S: Step
fn next_phase_wrapped_to(&mut self, rem: f64) -> f64
Before yielding the current phase, the internal phase is stepped forward and wrapped via the given value.
fn next_phase(&mut self) -> f64
Calls next_phase_wrapped_to
, with a wrapping value of 1.0
.
fn sine(self) -> Sine<S>
A composable version of the signal::sine
function.
fn saw(self) -> Saw<S>
A composable version of the signal::saw
function.
fn square(self) -> Square<S>
A composable version of the signal::square
function.
fn noise_simplex(self) -> NoiseSimplex<S>
A composable version of the signal::noise_simplex
function.
Trait Implementations
impl<S> Iterator for Phase<S> where S: Step
Derived Implementations
impl<S> Clone for Phase<S> where S: Clone
fn clone(&self) -> Phase<S>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more