Function vec2::lerp [−][src]
pub fn lerp<'out, T, F>(
out: &'out mut [T; 2],
a: &[T; 2],
b: &[T; 2],
t: &F
) -> &'out mut [T; 2] where
T: Clone + Cast<F>,
F: Clone + Cast<T>,
T: AddAssign<&'a T>,
F: MulAssign<&'a F>,
&'a T: Sub<&'b T, Output = T>,
Example
let mut v = vec2::new_zero(); vec2::lerp(&mut v, &vec2::new_zero(), &[100; 2], &0.5); assert_eq!(v, [50; 2]);