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

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 double scaled to a value between y1 and y2, inclusive

Parameters

x1x2

range of n

y1y2

range of scale