Trait Tweenable
pub trait Tweenable: Copy {
// Required method
fn interpolate(a: Self, b: Self, amount: f64) -> Self;
}
Available on crate feature
dep_kira
only.Expand description
A trait for types that can be smoothly interpolated.
Required Methods§
fn interpolate(a: Self, b: Self, amount: f64) -> Self
fn interpolate(a: Self, b: Self, amount: f64) -> Self
Returns an linearly interpolated value between a
and b
.
An amount of 0.0
should yield a
, an amount of 1.0
should
yield b
, and an amount of 0.5
should yield a value halfway
between a
and b
.
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.