Trait batbox_color::ColorComponent
source · pub trait ColorComponent: Copy {
const ZERO: Self;
const HALF: Self;
const MAX: Self;
// Required methods
fn as_f32(self) -> f32;
fn from_f32(value: f32) -> Self;
// Provided methods
fn convert<U: ColorComponent>(self) -> U { ... }
fn lerp(start: Self, end: Self, t: f32) -> Self { ... }
}
Expand description
A trait representing a color component in a color.
Required Associated Constants§
Required Methods§
Provided Methods§
sourcefn convert<U: ColorComponent>(self) -> U
fn convert<U: ColorComponent>(self) -> U
Convert from one type to another
Object Safety§
This trait is not object safe.