[−][src]Struct iced_audio::core::KnobAngleRange
The range between the minimum and maximum angle (in radians) the knob will rotate.
0.0
radians points straight down at the bottom of the knob, with the
angles rotating clockwise towards TAU
(2*PI
).
Values < 0.0
and >= TAU
are not allowed.
The default minimum (converted to degrees) is 30
degrees, and the default
maximum is 330
degrees, giving a span of 300
degrees, and a halfway
point pointing strait up.
Implementations
impl KnobAngleRange
[src]
pub fn from_deg(min: f32, max: f32) -> Self
[src]
The range between the min
and max
angle (in degrees) the knob
will rotate.
0.0
degrees points straight down at the bottom of the knob, with the
angles rotating clockwise towards 360
degrees.
Values < 0.0
and >= 360.0
will be set to 0.0
.
The default minimum is 30
degrees, and the default maximum is 330
degrees, giving a span of 300
degrees, and a halfway point pointing
strait up.
Panics
This will panic if min
> max
.
pub fn from_rad(min: f32, max: f32) -> Self
[src]
The span between the min
and max
angle (in radians) the knob
will rotate.
0.0
radians points straight down at the bottom of the knob, with the
angles rotating clockwise towards TAU
(2*PI
) radians.
Values < 0.0
and >= TAU
will be set to 0.0
.
The default minimum (converted to degrees) is 30
degrees, and the
default maximum is 330
degrees, giving a span of 300
degrees, and
a halfway point pointing strait up.
Panics
This will panic if min
> max
.
pub fn min(&self) -> f32
[src]
returns the minimum angle (between 0.0
and TAU
in radians)
pub fn max(&self) -> f32
[src]
returns the maximum angle (between 0.0
and TAU
in radians)
Trait Implementations
impl Clone for KnobAngleRange
[src]
fn clone(&self) -> KnobAngleRange
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for KnobAngleRange
[src]
impl Default for KnobAngleRange
[src]
Auto Trait Implementations
impl RefUnwindSafe for KnobAngleRange
impl Send for KnobAngleRange
impl Sync for KnobAngleRange
impl Unpin for KnobAngleRange
impl UnwindSafe for KnobAngleRange
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,