Browsing StarfallEx's section
โ† Back to ACE
Back to StarfallEx

Part of StarfallEx namespace

๐Ÿ”— External
math.lerp(t, from, to)
View on GitHub|lua/starfall/libs_sh/math.lua:350
๐Ÿ“‹ Has LDoc๐Ÿ‘๏ธ 0 viewsUpdated 2 months ago

Description

Performs a linear interpolation from the start number to the end number.

Parameters

NameTypeDescription
tnumberThe fraction for finding the result. This number is clamped between 0 and 1
fromnumberThe starting number. The result will be equal to this if value t is 0
tonumberThe ending number. The result will be equal to this if value t is 1

Returns

TypeDescription
numberThe result of the linear interpolation, (1 - t) * from + t * to

Examples

No examples available.

Used In

No usages found in the codebase.