Eval

Trait Eval 

Source
pub trait Eval<T> {
    // Required method
    fn eval_alpha(&self, alpha: f64) -> T;

    // Provided method
    fn into_animation_cell(self) -> AnimationCell<T>
       where Self: Sized + 'static { ... }
}
Expand description

This is the core of any animation, an animation is basically a function on time.

This represents a normalized animation function for type T, which accepts a progress value alpha in range [0, 1] and returns the evaluation result in type T.

Required Methods§

Source

fn eval_alpha(&self, alpha: f64) -> T

Evaluates at the given progress value alpha in range [0, 1].

Provided Methods§

Source

fn into_animation_cell(self) -> AnimationCell<T>
where Self: Sized + 'static,

Construct an AnimationCell<T> with default AnimationInfo

Implementors§

Source§

impl<T> Eval<T> for AnimationCell<T>

Source§

impl<T: Clone> Eval<T> for Static<T>