[−][src]Struct hxgm30noise::modifiers::threshold::Threshold
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
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,