pub struct PeriodicWaveOptions {
    pub real: Option<Vec<f32>>,
    pub imag: Option<Vec<f32>>,
    pub disable_normalization: bool,
}
Expand description

Options for constructing a PeriodicWave

Fields

real: Option<Vec<f32>>

The real parameter represents an array of cosine terms of Fourrier series.

The first element (index 0) represents the DC-offset. This offset has to be given but will not be taken into account to build the custom periodic waveform.

The following elements (index 1 and more) represent the fundamental and harmonics of the periodic waveform.

imag: Option<Vec<f32>>

The imag parameter represents an array of sine terms of Fourrier series.

The first element (index 0) will not be taken into account to build the custom periodic waveform.

The following elements (index 1 and more) represent the fundamental and harmonics of the periodic waveform.

disable_normalization: bool

By default PeriodicWave is build with normalization enabled (disable_normalization = false). In this case, a peak normalization is applied to the given custom periodic waveform.

If disable_normalization is enabled (disable_normalization = true), the normalization is defined by the periodic waveform characteristics (img, and real fields).

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.