Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript jquery map a range of numbers

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