-
-
Save pizza3/1308610233b3222bf40462f06a55ad3f to your computer and use it in GitHub Desktop.
Interpolate
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
| Array.prototype.interpolate = function(n, start1, stop1, start2, stop2) { | |
| return ((n-start1)/(stop1-start1))*(stop2-start2)+start2; | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment