Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

How to get a range numbers from given numbers in javascript

function scale (number, inMin, inMax, outMin, outMax) {
    return (number - inMin) * (outMax - outMin) / (inMax - inMin) + outMin;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #How #range #numbers #numbers #javascript
ADD COMMENT
Topic
Name
2+1 =