Syntax
long map(
    long value, 
    long fromLow, 
    long fromHigh, 
    long toLow, 
    long toHigh
);
ContentsIndex
PreviousUpNext
map
Syntax
long map(
    long value, 
    long fromLow, 
    long fromHigh, 
    long toLow, 
    long toHigh
);
Description

Re-maps a number from one range to another. That is, a value of fromLow would get mapped to toLow, a value of fromHigh to toHigh, values in-between to values in-between, etc.

Parameters
Parameters 
Description 
long value 
the number to map
 
long fromLow 
the lower bound of the value's current range
 
long fromHigh 
the upper bound of the value's current range
 
long toLow 
the lower bound of the value's target range
 
long toHigh 
the upper bound of the value's target range  
Returns

The mapped value.

File

WMath.h

Group