pub trait InterpolatedPropertyValue:
PartialEq
+ Default
+ 'static {
// Required method
fn interpolate(&self, target_value: &Self, t: f32) -> Self;
}
Expand description
InterpolatedPropertyValue is a trait used to enable properties to be used with animations that interpolate values. The basic requirement is the ability to apply a progress that’s typically between 0 and 1 to a range.
Required Methods§
Sourcefn interpolate(&self, target_value: &Self, t: f32) -> Self
fn interpolate(&self, target_value: &Self, t: f32) -> Self
Returns the interpolated value between self and target_value according to the progress parameter t that’s usually between 0 and 1. With certain animation easing curves it may over- or undershoot though.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.