pub enum ParamRange {
Linear {
min: f64,
max: f64,
},
Logarithmic {
min: f64,
max: f64,
},
Discrete {
min: i64,
max: i64,
},
Enum {
count: usize,
},
}Expand description
Defines how a parameter maps between plain and normalized values.
Variants§
Implementations§
Source§impl ParamRange
impl ParamRange
Sourcepub fn denormalize(&self, normalized: f64) -> f64
pub fn denormalize(&self, normalized: f64) -> f64
Map 0.0–1.0 back to a plain value.
Sourcepub fn step_count(&self) -> u32
pub fn step_count(&self) -> u32
Number of discrete steps (0 = continuous).
Trait Implementations§
Source§impl Clone for ParamRange
impl Clone for ParamRange
Source§fn clone(&self) -> ParamRange
fn clone(&self) -> ParamRange
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ParamRange
impl RefUnwindSafe for ParamRange
impl Send for ParamRange
impl Sync for ParamRange
impl Unpin for ParamRange
impl UnsafeUnpin for ParamRange
impl UnwindSafe for ParamRange
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