pub trait Tweenable: Copy {
// Required method
fn interpolate(from: Self, to: Self, t: f32) -> Self;
}Expand description
Values that can be interpolated by a tween.
t is eased progress. It is 0.0 and 1.0 at the endpoints but may lie
outside [0, 1] for overshooting curves such as Ease::BackOut.
Required Methods§
Sourcefn interpolate(from: Self, to: Self, t: f32) -> Self
fn interpolate(from: Self, to: Self, t: f32) -> Self
Interpolates (or extrapolates) from from toward to.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl Tweenable for [u8; 4]
8-bit RGBA colors (the core’s mesh and manifest color layout). Each channel
is interpolated independently, rounded and clamped to 0..=255.
impl Tweenable for [u8; 4]
8-bit RGBA colors (the core’s mesh and manifest color layout). Each channel
is interpolated independently, rounded and clamped to 0..=255.