Created
January 8, 2020 03:59
-
-
Save marioecg/26ed0c2b0686acc4e2d7c5aa6e786edb to your computer and use it in GitHub Desktop.
Linear interpolation (lerp or mix)
This file contains 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
function lerp(start, end, t) { | |
return start * (1 - t) + end * t; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment