Trait nannou_core::color::ComponentWise [−][src]
pub trait ComponentWise {
type Scalar;
fn component_wise<F>(&self, other: &Self, f: F) -> Self
where
F: FnMut(Self::Scalar, Self::Scalar) -> Self::Scalar;
fn component_wise_self<F>(&self, f: F) -> Self
where
F: FnMut(Self::Scalar) -> Self::Scalar;
}
Expand description
Perform a unary or binary operation on each component of a color.
Associated Types
Required methods
Perform a binary operation on this and an other color.
fn component_wise_self<F>(&self, f: F) -> Self where
F: FnMut(Self::Scalar) -> Self::Scalar,
fn component_wise_self<F>(&self, f: F) -> Self where
F: FnMut(Self::Scalar) -> Self::Scalar,
Perform a unary operation on this color.