Trait bevy_particle_systems::values::Lerpable
source · [−]Expand description
Linearly interpolates between two values by a given percentage.
pct
should be between 0.0
and 1.0
, but it is up to the trait implementor to ensure
that the value is clamped.
Examples
assert_eq!(0.0_f32.lerp(1.0, 0.5), 0.5);
assert_eq!(Color::WHITE.lerp(Color::BLACK, 0.5), Color::rgba(0.5, 0.5, 0.5, 1.0));