Skip to main content

Animate

Trait Animate 

Source
pub trait Animate:
    Clone
    + PartialEq
    + 'static {
    // Required method
    fn lerp(&self, to: &Self, t: f32) -> Self;
}
Expand description

A value an animation can move between two of: lerp gives the value t of the way from self to to, where t may stray a little past 0 or 1 for an easing that overshoots.

Required Methods§

Source

fn lerp(&self, to: &Self, t: f32) -> Self

The value t of the way from self to to.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Animate for f32

Source§

fn lerp(&self, to: &f32, t: f32) -> f32

Implementors§