pub enum Variation {
Delta {
max: [f32; 4],
stream: u32,
},
Fraction {
max: [f32; 4],
stream: u32,
},
Range {
min: [f32; 4],
max: [f32; 4],
stream: u32,
},
Scaled {
input: u32,
factor: Curve,
},
}Expand description
Random variation of a Value, drawn from the stream named in each case (a draw is a uniform number in [0, 1) per
component, keyed as the module says).
Variants§
Delta
base + (2u - 1) * max: the base varies by up to max either way.
Fraction
base + (2u - 1) * max * base: the base varies by up to the fraction max of itself.
Range
base + min + u * (max - min): a random addition in a range.
Scaled
base * factor(input): the base scaled by a curve of an Input’s current value.
Trait Implementations§
impl StructuralPartialEq for Variation
Auto Trait Implementations§
impl Forget for Variation
impl Freeze for Variation
impl RefUnwindSafe for Variation
impl Send for Variation
impl Sync for Variation
impl Unpin for Variation
impl UnsafeUnpin for Variation
impl UnwindSafe for Variation
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