Struct exoquant::Colorf
[−]
[src]
pub struct Colorf { pub r: f64, pub g: f64, pub b: f64, pub a: f64, }
A color with floating point channel components.
Used for all internal processing.
It implements Mul
, Div
, Add
and Sub
operators that apply each operation component
wise to each channel in turn.
Fields
r | |
g | |
b | |
a |
Methods
impl Colorf
[src]
fn zero() -> Colorf
Returns a Colorf
with all channel components set to zero.
fn dot(&self, rhs: &Colorf) -> f64
Returns the dot product of two Colorf
s.
fn abs(&self) -> f64
Returns the magnitude (vector length) of a Colorf
.
fn pow(&self, e: f64) -> Colorf
Returns a new Colorf
with each color component raised to the given power.
Trait Implementations
impl Add for Colorf
[src]
type Output = Colorf
The resulting type after applying the +
operator
fn add(self, rhs: Colorf) -> Colorf
The method for the +
operator
impl Add<f64> for Colorf
[src]
type Output = Colorf
The resulting type after applying the +
operator
fn add(self, rhs: f64) -> Colorf
The method for the +
operator
impl AddAssign for Colorf
[src]
fn add_assign(&mut self, rhs: Colorf)
The method for the +=
operator
impl Sub for Colorf
[src]
type Output = Colorf
The resulting type after applying the -
operator
fn sub(self, rhs: Colorf) -> Colorf
The method for the -
operator
impl Mul<f64> for Colorf
[src]
type Output = Colorf
The resulting type after applying the *
operator
fn mul(self, rhs: f64) -> Colorf
The method for the *
operator
impl MulAssign<f64> for Colorf
[src]
fn mul_assign(&mut self, rhs: f64)
The method for the *=
operator
impl Mul for Colorf
[src]
type Output = Colorf
The resulting type after applying the *
operator
fn mul(self, rhs: Colorf) -> Colorf
The method for the *
operator
impl Div for Colorf
[src]
type Output = Colorf
The resulting type after applying the /
operator
fn div(self, rhs: Colorf) -> Colorf
The method for the /
operator
Derived Implementations
impl Debug for Colorf
[src]
impl Clone for Colorf
[src]
fn clone(&self) -> Colorf
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