Skip to main content

Vector4.Lerp(Vector4 a, Vector4 b, number t)

Linearly interpolates between two vectors.

Parameters:

NameTypeDescription
aVector4a
bVector4b
tnumbert

Returns:

typeDescription
Vector4Interpolates between a and b by amount t.

Usage

---@type Vector4
local a;

---@type Vector4
local b;

---@type number
local t;


local val0 = Vector4:Lerp(a, b, t)

Extra Detail

Interpolates between a and b by amount t.The parameter t is clamped between [0...1].
When t = 0 returns a.
When t = 1 returns b.
When t = 0.5 returns the midpoint of a and b.