Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js map value in range

(val, in_min, in_max, out_min, out_max) => (val - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
 
PREVIOUS NEXT
Tagged: #js #map #range
ADD COMMENT
Topic
Name
5+6 =