[][src]Struct hxgm30noise::modifiers::threshold::Threshold

pub struct Threshold<'a, T: 'a> {
    pub source: &'a dyn NoiseFn<T>,
    pub cutoff: f64,
}

Noise function that applies a threshold to the output value from the source function, converting it to either 1.0 or -1.0. This is done by comparing the output value to the cutoff: if the value is equal to or less than the cutoff, Threshold converts the value to -1.0; above, and it is converted to 1.0.

Fields

source: &'a dyn NoiseFn<T>

Outputs a value.

cutoff: f64

Cutoff of the threshold. Default is 0.0.

Methods

impl<'a, T> Threshold<'a, T>[src]

pub fn new(source: &'a dyn NoiseFn<T>) -> Self[src]

pub fn set_cutoff(self, cutoff: f64) -> Self[src]

Trait Implementations

impl<'a, T> NoiseFn<T> for Threshold<'a, T>[src]

Auto Trait Implementations

impl<'a, T> !RefUnwindSafe for Threshold<'a, T>

impl<'a, T> !Send for Threshold<'a, T>

impl<'a, T> !Sync for Threshold<'a, T>

impl<'a, T> Unpin for Threshold<'a, T>

impl<'a, T> !UnwindSafe for Threshold<'a, T>

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

impl<T> SetParameter for T

impl<T> SetParameter for T

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.