pub trait Interpolatable: Sized + Clone {
// Provided method
fn interpolate(&self, _other: &Self, _t: f64) -> Self { ... }
}Expand description
Marks a value as able to participate in Pax property transitions.
Provided Methods§
Sourcefn interpolate(&self, _other: &Self, _t: f64) -> Self
fn interpolate(&self, _other: &Self, _t: f64) -> Self
Interpolates this value toward other at time t on the unit interval.
The default implementation acts like a None ease: the first value is
simply retained until the transition completes.
Vectors interpolate element by element when lengths match and switch
to the destination immediately when their lengths differ. Integer
interpolation uses floating-point arithmetic and truncates the result.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".