pub struct Oscillator { /* private fields */ }Expand description
Infinite stateless periodic scalar animation.
Implementations§
Source§impl Oscillator
impl Oscillator
Sourcepub fn try_new(
waveform: Waveform,
frequency_hertz: f64,
) -> Result<Self, ValidationError>
pub fn try_new( waveform: Waveform, frequency_hertz: f64, ) -> Result<Self, ValidationError>
Creates a unit-amplitude oscillator with zero phase and offset.
Use Oscillator::builder to configure those; frequency_hertz must be finite,
nonnegative and at most 1e290.
Sourcepub fn builder(waveform: Waveform, frequency_hertz: f64) -> OscillatorBuilder
pub fn builder(waveform: Waveform, frequency_hertz: f64) -> OscillatorBuilder
Starts a builder for a waveform with the given frequency in hertz.
Trait Implementations§
Source§impl Clone for Oscillator
impl Clone for Oscillator
Source§impl Debug for Oscillator
impl Debug for Oscillator
Source§impl Signal<f64> for Oscillator
impl Signal<f64> for Oscillator
Source§fn sample(&self, time: Time) -> f64
fn sample(&self, time: Time) -> f64
Samples without advancing a clock or changing playback state.
Source§fn map<Output, Function>(self, function: Function) -> Map<Self, Function, Value>
fn map<Output, Function>(self, function: Function) -> Map<Self, Function, Value>
Transforms values without changing timing.
Auto Trait Implementations§
impl Forget for Oscillator
impl Freeze for Oscillator
impl Move for Oscillator
impl RefUnwindSafe for Oscillator
impl Send for Oscillator
impl Sync for Oscillator
impl Unpin for Oscillator
impl UnsafeUnpin for Oscillator
impl UnwindSafe for Oscillator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more