map()

Math / Calculation

Description

Re-maps a number from one range to another.

Syntax

float map(float value, float start1, float stop1, float start2, float stop2)

Parameters

NameTypeDescription
valuefloatthe incoming value to be converted
start1floatlower bound of the input range
stop1floatupper bound of the input range
start2floatlower bound of the output range
stop2floatupper bound of the output range

Returns

float

Related

Under the Hood

Implementation in Processing.h / Processing.cpp:

Loading...