Trait bevy::color::Mix

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§

fn mix(&self, other: &Self, factor: f32) -> Self

Linearly interpolate between this and another color, by factor. Factor should be between 0.0 and 1.0.

Provided Methods§

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.

Implementors§

§

impl Mix for Color

§

impl Mix for Hsla

§

impl Mix for Hsva

§

impl Mix for Hwba

§

impl Mix for Laba

§

impl Mix for Lcha

§

impl Mix for LinearRgba

§

impl Mix for Oklaba

§

impl Mix for Oklcha

§

impl Mix for Srgba

§

impl Mix for Xyza