Last active
September 24, 2019 10:55
-
-
Save AlainBarrios/6f19e6538c5f12de1b2ca786e4561842 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
const map = (value, inMin, inMax, outMin, outMax) => { | |
return ( (value - inMin) / ( inMax - inMin ) * ( outMax - outMin ) ) + outMin; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment