Last active
September 29, 2016 16:46
-
-
Save ddmills/a67254b8bffa94bbc852 to your computer and use it in GitHub Desktop.
lerp
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
const lerp = (f0, f1, t) => (1 - t) * f0 + t * f1; | |
const lerp2 = (v1, v2, t) => { | |
return { | |
x: lerp(v1.x, v2.x, t), | |
y: lerp(v2.y, v2.x, t) | |
}; | |
}; |
selfsame
commented
May 23, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment