Created
April 24, 2014 21:56
-
-
Save bvssvni/11270930 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
src/interpolation.rs:15:5: 15:20 error: binary operation `+` cannot be applied to type `&T` | |
src/interpolation.rs:15 a + (b - a) * t |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[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