vreScaleNumber takes a value from one range and scales it proportionally into another range.

vreScaleNumber(n1, n2, vMin, vMax, value, decimalPlaces = 3)

Arguments

n1

The lower value of the target range.

n2

The upper value of the target range.

vMin

The lower value of the source range.

vMax

The upper value of the source range.

value

The source value to rescale into the target range.

decimalPlaces

The number of decimal places to round the result to.

Value

The value rescaled into the target range.