[][src]Struct iced_audio::core::KnobAngleRange

pub struct KnobAngleRange { /* fields omitted */ }

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]

impl Debug for KnobAngleRange[src]

impl Default for KnobAngleRange[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SetParameter for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,