Normalize Data Member Function

Converts the array from source value range A-B to destination value range C-D. For example: converts values from 0-255 to 0.0 to 1.0.

Prototype

int32 Normalize( Uint16Iterator first, Uint16Iterator last, uint16 currMin, uint16 currMax, uint16 newMin, uint16 newMax )

Parameters

Parameter Type Parameter Name Documentation
<Uint16Iterator>firstAn iterator at the start of the range.
<Uint16Iterator>lastAn iterator at the end of the range.
uint16currMinFor the source range A-B, this value represents the current minimum, or A.
uint16currMaxFor the source range A-B, this value represents the current maximum, or B.
uint16newMinFor the destination range C-D, this value represents the new minimum, or C.
uint16newMaxFor the destination range C-D, this value represents the new maximum, or D.

Examples

Copy Text To Clipboard

None published. Please look for an example in the Simdify Scripting Language code base.