Skip to content

raylib.Lerp

JoeStrout edited this page Apr 29, 2026 · 2 revisions

Calculate linear interpolation between two floats

Parameters

Parameter Default Value Note
start 0
end 1
amount 0

Return value

Condition Return Value
(always) number

Notes

Example

// Interpolate halfway between 0 and 100
mid = raylib.Lerp(0, 100, 0.5)
print mid  // 50

Clone this wiki locally