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§
Sourcefn eval_alpha(&self, alpha: f64) -> T
fn eval_alpha(&self, alpha: f64) -> T
Evaluates at the given progress value alpha in range [0, 1].
Provided Methods§
Sourcefn into_animation_cell(self) -> AnimationCell<T>where
Self: Sized + 'static,
fn into_animation_cell(self) -> AnimationCell<T>where
Self: Sized + 'static,
Construct an AnimationCell<T> with default AnimationInfo