lerp()

Math / Calculation

Description

Calculates a number between two numbers at a specific increment. amt 0.0 returns a, amt 1.0 returns b.

Syntax

float lerp(float a, float b, float t)

Parameters

NameTypeDescription
afloatfirst value
bfloatsecond value
tfloatbetween 0.0 and 1.0

Returns

float

Related

Under the Hood

Implementation in Processing.h / Processing.cpp:

Loading...