Struct iced_audio::core::range::IntRange [−][src]
pub struct IntRange { /* fields omitted */ }
A range that defines a discrete linear range of i32 values
Implementations
impl IntRange
[src]
impl IntRange
[src]pub fn normal_param(&self, value: i32, default: i32) -> NormalParam
[src]
pub fn normal_param(&self, value: i32, default: i32) -> NormalParam
[src]Creates a new NormalParam
with values mapped
from this range.
value
- The inital value of the parameter.default_value
- The default value of the parameter.
pub fn default_normal_param(&self) -> NormalParam
[src]
pub fn default_normal_param(&self) -> NormalParam
[src]Creates a new NormalParam
with values mapped
from this range where value
and default_value
is 0
.
pub fn snapped(&self, normal: Normal) -> Normal
[src]
pub fn snapped(&self, normal: Normal) -> Normal
[src]Returns a Normal
that is snapped to the closest integer
value in this range.
pub fn map_to_normal(&self, value: i32) -> Normal
[src]
pub fn map_to_normal(&self, value: i32) -> Normal
[src]Returns the corresponding Normal
from the supplied value
pub fn unmap_to_value(&self, normal: Normal) -> i32
[src]
pub fn unmap_to_value(&self, normal: Normal) -> i32
[src]Returns the corresponding value from the supplied Normal
Trait Implementations
impl Copy for IntRange
[src]
Auto Trait Implementations
impl RefUnwindSafe for IntRange
impl Send for IntRange
impl Sync for IntRange
impl Unpin for IntRange
impl UnwindSafe for IntRange
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,