Skip to content

Instantly share code, notes, and snippets.

@bvssvni
Created April 24, 2014 21:56
Show Gist options
  • Save bvssvni/11270930 to your computer and use it in GitHub Desktop.
Save bvssvni/11270930 to your computer and use it in GitHub Desktop.
src/interpolation.rs:15:5: 15:20 error: binary operation `+` cannot be applied to type `&T`
src/interpolation.rs:15 a + (b - a) * t
#[inline(always)]
pub fn lerp<T: Add<T, T> + Sub<T, T> + Mul<T, T>>(a: &T, b: &T, t: &T) -> T {
a + (b - a) * t
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment