pub struct ScaleBias<'a, T> {
pub source: &'a dyn NoiseFn<T>,
pub scale: f64,
pub bias: f64,
}
Expand description
Noise function that applies a scaling factor and a bias to the output value from the source function.
The function retrieves the output value from the source function, multiplies it with the scaling factor, adds the bias to it, then outputs the value.
Fields§
§source: &'a dyn NoiseFn<T>
Outputs a value.
scale: f64
Scaling factor to apply to the output value from the source function. The default value is 1.0.
bias: f64
Bias to apply to the scaled output value from the source function. The default value is 0.0.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> !RefUnwindSafe for ScaleBias<'a, T>
impl<'a, T> !Send for ScaleBias<'a, T>
impl<'a, T> !Sync for ScaleBias<'a, T>
impl<'a, T> Unpin for ScaleBias<'a, T>
impl<'a, T> !UnwindSafe for ScaleBias<'a, T>
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