I remember using an equation to do this at some point – how do you do this in Javascript?
Plugin two number ranges:
rangeX = 1 (through) 10; rangeY =
Use percentages:
xMax = 10; xMin = 1; yMax = 559.22; yMin = 300.77; percent = (inputY - yMin) / (yMax - yMin); outputX = percent * (xMax - xMin) + xMin;