Struct glm_color::srgb::Srgb
[−]
[src]
pub struct Srgb { /* fields omitted */ }
The sRGB color space.
See
Wikipedia page sRGB, from where the numbers used in conversion between linear RGB and sRGB are got.
Methods
impl Srgb
[src]
fn new(r: f32, g: f32, b: f32) -> Srgb
Creates an Srgb
value.
Parameters are clampped to range [0, 1].
fn red(&self) -> f32
Returns the value of red channel of self.
fn green(&self) -> f32
Returns the value of green channel of self.
fn blue(&self) -> f32
Returns the value of blue channel of self.
fn as_vec3(&self) -> &Vec3
Re-interprets a reference of Srgb
to Vec3
.
Trait Implementations
impl Copy for Srgb
[src]
impl Clone for Srgb
[src]
fn clone(&self) -> Srgb
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl PartialEq for Srgb
[src]
fn eq(&self, __arg_0: &Srgb) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Srgb) -> bool
This method tests for !=
.
impl Debug for Srgb
[src]
impl Rand for Srgb
[src]
fn rand<R: Rng>(rng: &mut R) -> Srgb
Generates a random instance of this type using the specified source of randomness. Read more
impl Eq for Srgb
[src]
impl ApproxEq for Srgb
[src]
type BaseType = f32
fn is_close_to(&self, other: &Srgb, max_diff: f32) -> bool
Returns true
if the difference between x
and y
is less than max_diff
. Read more
fn is_approx_eq(&self, rhs: &Self) -> bool
Returns true
if the difference between x
and y
is less than machine epsilon. Read more