Trait bevy_color::prelude::Mix
source · 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.
Object Safety§
This trait is not object safe.