Function pareen::prop

source ·
pub fn prop<T, V, W>(m: V) -> Anim<impl Fun<T = T, V = W>>where
    V: Clone + Mul<Output = W> + From<T>,
Expand description

An animation that returns a value proportional to time.

Example

Scale time with a factor of three:

let anim = pareen::prop(3.0f32);

assert_approx_eq!(anim.eval(0.0f32), 0.0);
assert_approx_eq!(anim.eval(3.0), 9.0);