pub trait Mix: Sized {
// Required method
fn mix(&self, other: &Self, factor: f32) -> Self;
// Provided method
fn mix_assign(&mut self, other: Self, factor: f32) { ... }
}
Expand description
Linear interpolation of two colors within a given color space.
Required Methods§
Provided Methods§
Sourcefn mix_assign(&mut self, other: Self, factor: f32)
fn mix_assign(&mut self, other: Self, factor: f32)
Linearly interpolate between this and another color, by factor, storing the result in this color. Factor should be between 0.0 and 1.0.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.