pub trait Tweenable:
Copy
+ Send
+ Sync
+ 'static {
// Required method
fn lerp(self, other: Self, t: f32) -> Self;
}Expand description
A value that can be interpolated between two points.
Types implementing this trait can be animated using [Tween].
§Examples
use eazy_tweener::Tweenable;
let a = 0.0_f32;
let b = 100.0_f32;
let mid = a.lerp(b, 0.5);
assert_eq!(mid, 50.0);Required Methods§
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.