pub trait Animatable: Copy {
const REST: f32;
// Required methods
fn to_components(self) -> [f32; 4];
fn from_components(c: [f32; 4]) -> Self;
}Expand description
A value that can be animated: up to four numbers that add and subtract.
Required Associated Constants§
Required Methods§
Sourcefn to_components(self) -> [f32; 4]
fn to_components(self) -> [f32; 4]
The value as numbers to interpolate.
Sourcefn from_components(c: [f32; 4]) -> Self
fn from_components(c: [f32; 4]) -> Self
The value back from interpolated numbers, which may overshoot.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".