pub trait Easing<F: Float> {
// Required methods
fn ease_in(t: F, b: F, c: F, d: F) -> F;
fn ease_out(t: F, b: F, c: F, d: F) -> F;
fn ease_in_out(t: F, b: F, c: F, d: F) -> F;
}
Expand description
Interface encapsulating general easing functions
t
is the current time (or position) of the tween. This can be seconds or frames, steps, seconds, ms, whatever as long as the unit is the same as is used for the total time.b
is the beginning value of the property.c
is the change between the beginning and destination value of the property.d
is the total time of the tween.
Required Methods§
fn ease_in(t: F, b: F, c: F, d: F) -> F
fn ease_out(t: F, b: F, c: F, d: F) -> F
fn ease_in_out(t: F, b: F, c: F, d: F) -> F
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.