map

open fun map(    x: Double,     xmin: Double,     xmax: Double,     ymin: Double,     ymax: Double): Double

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)