toSNorm

fun toSNorm(value: Double, rangeMaximum: Double? = definedExternally): Double(source)

Converts a scalar value in the range -1.0, 1.0 to a SNORM in the range 0, rangeMaximum

Return

A SNORM value, where 0 maps to -1.0 and rangeMaximum maps to 1.0.

Parameters

value

The scalar value in the range -1.0, 1.0

rangeMaximum

The maximum value in the mapped range, 255 by default. Default value - 255

See also