Struct palette::LuvHue [−][src]
Expand description
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
Create a new hue from degrees.
Create a new hue from radians, instead of degrees.
Get the hue as degrees, in the range (-180, 180]
.
Convert the hue to radians, in the range (-π, π]
.
Convert the hue to positive degrees, in the range [0, 360)
.
Convert the hue to positive radians, in the range [0, 2π)
.
Get the internal representation, without normalizing it.
Get the internal representation as radians, without normalizing it.
Trait Implementations
The default tolerance to use when testing values that are close together. Read more
A test for equality that uses the absolute difference to compute the approximate equality of two numbers. Read more
The inverse of AbsDiffEq::abs_diff_eq
.
Performs the +=
operation. Read more
Performs the +=
operation. Read more
Performs the +=
operation. Read more
Performs the +=
operation. Read more
impl<T: Float + FromF64 + RelativeEq> RelativeEq<LuvHue<T>> for LuvHue<T> where
T::Epsilon: Float + FromF64,
impl<T: Float + FromF64 + RelativeEq> RelativeEq<LuvHue<T>> for LuvHue<T> where
T::Epsilon: Float + FromF64,
The default relative tolerance for testing values that are far-apart. Read more
A test for equality that uses a relative comparison if the values are far apart.
The inverse of RelativeEq::relative_eq
.
Performs the -=
operation. Read more
Performs the -=
operation. Read more
Performs the -=
operation. Read more
Performs the -=
operation. Read more
The default ULPs to tolerate when testing values that are far-apart. Read more
A test for equality that uses units in the last place (ULP) if the values are far apart.
Auto Trait Implementations
impl<T> RefUnwindSafe for LuvHue<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for LuvHue<T> where
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>,
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>,
Mutably borrows from an owned value. Read more
Convert into T with values clamped to the color defined bounds Read more
Convert into T. The resulting color might be invalid in its color space Read more
Convert into T, returning ok if the color is inside of its defined
range, otherwise an OutOfBounds
error is returned which contains
the unclamped color. Read more