normalize

fun normalize(value: Double, rangeMinimum: Double, rangeMaximum: Double): Double(source)

Converts a scalar value in the range rangeMinimum, rangeMaximum to a scalar in the range 0.0, 1.0

Return

A scalar value, where rangeMinimum maps to 0.0 and rangeMaximum maps to 1.0.

Parameters

value

The scalar value in the range rangeMinimum, rangeMaximum

rangeMinimum

The minimum value in the mapped range.

rangeMaximum

The maximum value in the mapped range.

See also