Struct picto::color::RgbHue [−][src]
Expand description
A hue type for the RGB family of color spaces.
It’s measured in degrees and uses the three additive primaries red, green and blue.
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 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π)
.
Trait Implementations
type Epsilon = <T as ApproxEq>::Epsilon
type Epsilon = <T as ApproxEq>::Epsilon
Used for specifying relative comparisons.
The default tolerance to use when testing values that are close together. Read more
The default relative tolerance for testing values that are far-apart. Read more
The default ULPs to tolerate when testing values that are far-apart. Read more
A test for equality that uses a relative comparison if the values are far apart.
A test for equality that uses units in the last place (ULP) if the values are far apart.
The inverse of ApproxEq::relative_eq
.
Auto Trait Implementations
impl<T> RefUnwindSafe for RgbHue<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for RgbHue<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more