scale
Scale a number in the range of x1
to x2
, to the range of y1
to y2
.
Return
a double scaled to a value between y1 and y2, inclusive
Parameters
n
number to scale
x1
lower bound range of n
x2
upper bound range of n
y1
lower bound of scale
y2
upper bound of scale
Scale a number in the range of x1
to x2
, to the range of y1
to y2
.
Return
a float scaled to a value between y1 and y2, inclusive
Parameters
n
number to scale
x1
lower bound range of n
x2
upper bound range of n
y1
lower bound of scale
y2
upper bound of scale