pub enum Transform {
Linear,
Exponential,
Logarithmic,
Inverted,
Custom(Arc<dyn Fn(f32) -> f32 + Send + Sync>),
}Expand description
Type of value transformation.
Variants§
Linear
Linear: out = min + value * (max - min).
Exponential
Exponential: out = min + value² * (max - min).
Logarithmic
Logarithmic: out = min + log₁₀(1 + value * 9) / log₁₀(10) * (max - min).
Inverted
Inverted: out = max - value * (max - min).
Custom(Arc<dyn Fn(f32) -> f32 + Send + Sync>)
Custom user-defined function.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Transform
impl !RefUnwindSafe for Transform
impl Send for Transform
impl Sync for Transform
impl Unpin for Transform
impl UnsafeUnpin for Transform
impl !UnwindSafe for Transform
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