map

open fun map(x: Double, xMin: Double, xMax: Double, yMin: Double, yMax: Double): Double(source)

Map x from [xMin, xMax] to [yMin, yMax].

Return

the new value for x

Parameters

x

- x

xMin

- the lower bound of the actual x scale (included)

xMax

- the upper bound of the actual x scale (included)

yMin

- the lower bound of the new x scale (included)

yMax

- the upper bound of the new x scale (included)