Struct palette::LuvHue [−][src]
A hue type for the CIE L*u*v* family of color spaces.
The hue is a circular type, where 0
and 360
is the same, and
it’s normalized to (-180, 180]
when it’s converted to a linear
number (like f32
). This makes many calculations easier, but may
also have some surprising effects if it’s expected to act as a
linear number.
Implementations
impl<T: Float + FromF64> LuvHue<T>
[src]
impl<T: Float + FromF64> LuvHue<T>
[src]pub fn from_degrees(degrees: T) -> LuvHue<T>
[src]
Create a new hue from degrees.
pub fn from_radians(radians: T) -> LuvHue<T>
[src]
Create a new hue from radians, instead of degrees.
pub fn to_degrees(self) -> T
[src]
Get the hue as degrees, in the range (-180, 180]
.
pub fn to_radians(self) -> T
[src]
Convert the hue to radians, in the range (-π, π]
.
pub fn to_positive_degrees(self) -> T
[src]
Convert the hue to positive degrees, in the range [0, 360)
.
pub fn to_positive_radians(self) -> T
[src]
Convert the hue to positive radians, in the range [0, 2π)
.
pub fn to_raw_degrees(self) -> T
[src]
Get the internal representation, without normalizing it.
pub fn to_raw_radians(self) -> T
[src]
Get the internal representation as radians, without normalizing it.
Trait Implementations
impl<T: Float + FromF64 + AbsDiffEq> AbsDiffEq<LuvHue<T>> for LuvHue<T> where
T::Epsilon: Float + FromF64,
[src]
impl<T: Float + FromF64 + AbsDiffEq> AbsDiffEq<LuvHue<T>> for LuvHue<T> where
T::Epsilon: Float + FromF64,
[src]type Epsilon = T::Epsilon
Used for specifying relative comparisons.
fn default_epsilon() -> Self::Epsilon
[src]
fn abs_diff_eq(&self, other: &Self, epsilon: T::Epsilon) -> bool
[src]
fn abs_diff_ne(&self, other: &Self, epsilon: T::Epsilon) -> bool
[src]
impl<T: Float + AddAssign> AddAssign<LuvHue<T>> for LuvHue<T>
[src]
impl<T: Float + AddAssign> AddAssign<LuvHue<T>> for LuvHue<T>
[src]fn add_assign(&mut self, other: LuvHue<T>)
[src]
impl<T: Float + FromF64 + RelativeEq> RelativeEq<LuvHue<T>> for LuvHue<T> where
T::Epsilon: Float + FromF64,
[src]
impl<T: Float + FromF64 + RelativeEq> RelativeEq<LuvHue<T>> for LuvHue<T> where
T::Epsilon: Float + FromF64,
[src]fn default_max_relative() -> Self::Epsilon
[src]
fn relative_eq(
&self,
other: &Self,
epsilon: T::Epsilon,
max_relative: T::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: T::Epsilon,
max_relative: T::Epsilon
) -> bool
fn relative_ne(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
impl<T: Float + SubAssign> SubAssign<LuvHue<T>> for LuvHue<T>
[src]
impl<T: Float + SubAssign> SubAssign<LuvHue<T>> for LuvHue<T>
[src]fn sub_assign(&mut self, other: LuvHue<T>)
[src]
impl<T: Float + FromF64 + UlpsEq> UlpsEq<LuvHue<T>> for LuvHue<T> where
T::Epsilon: Float + FromF64,
[src]
impl<T: Float + FromF64 + UlpsEq> UlpsEq<LuvHue<T>> for LuvHue<T> where
T::Epsilon: Float + FromF64,
[src]impl<T: Copy + Float> Copy for LuvHue<T>
[src]
impl<T: Float + FromF64 + Eq> Eq for LuvHue<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for LuvHue<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for LuvHue<T> where
T: Send,
T: Send,
impl<T> Sync for LuvHue<T> where
T: Sync,
T: Sync,
impl<T> Unpin for LuvHue<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for LuvHue<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: FloatComponent,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
[src]
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: FloatComponent,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
[src]pub fn adapt_into_using<M>(Self, M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
[src]
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into(self) -> D
[src]
impl<T, U> IntoColor<U> for T where
U: FromColor<T>,
[src]
impl<T, U> IntoColor<U> for T where
U: FromColor<T>,
[src]pub fn into_color(Self) -> U
[src]
impl<T, U> IntoColorUnclamped<U> for T where
U: FromColorUnclamped<T>,
[src]
impl<T, U> IntoColorUnclamped<U> for T where
U: FromColorUnclamped<T>,
[src]pub fn into_color_unclamped(Self) -> U
[src]
impl<T, U> TryIntoColor<U> for T where
U: TryFromColor<T>,
[src]
impl<T, U> TryIntoColor<U> for T where
U: TryFromColor<T>,
[src]