[−][src]Function pareen::id
pub fn id<T, V>() -> Anim<impl Fun<T = T, V = V>> where
V: From<T>,
An animation that returns time as its value.
This is the same as prop
with a factor of one.
Examples
let anim = pareen::id::<isize, isize>(); assert_eq!(anim.eval(-100), -100); assert_eq!(anim.eval(0), 0); assert_eq!(anim.eval(100), 100);
let anim = pareen::id() * 3.0f32 + 4.0; assert_approx_eq!(anim.eval(0.0), 4.0); assert_approx_eq!(anim.eval(100.0), 304.0);