[][src]Struct meander::UnitSinusoid

pub struct UnitSinusoid {
    pub frequency: f64,
    pub phase: f64,
}

Represents a sinusoid that varies between 0 and 1.

This can be generated randomly using rand::random().

Fields

frequency: f64

The number of cycles the function makes per unit time.

phase: f64

The location in the cycle the function is t = 0.

Methods

impl UnitSinusoid[src]

pub fn evaluate(self, t: f64) -> f64[src]

Find the value of the sinusoid at a given point in time.

Trait Implementations

impl Copy for UnitSinusoid[src]

impl Clone for UnitSinusoid[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for UnitSinusoid[src]

impl Distribution<UnitSinusoid> for Standard[src]

fn sample_iter<R>(&'a self, rng: &'a mut R) -> DistIter<'a, Self, R, T> where
    R: Rng
[src]

Create an iterator that generates random values of T, using rng as the source of randomness. Read more

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same for T

type Output = T

Should always be Self