Created
September 26, 2018 14:46
-
-
Save miduku/ce325ceda00fe199d05f847b7bf09f64 to your computer and use it in GitHub Desktop.
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 mapRange(value, domainMin, domainMax, rangeMin, rangeMax) { | |
return ((value - domainMin) / (domainMax - domainMin)) * (rangeMax - rangeMin) + rangeMin; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment