Skip to main content

Mathf.LerpAngle(number a, number b, number t)

Same as Lerp but makes sure the values interpolate correctly when they wrap around 360 degrees.

Parameters:

NameTypeDescription
anumberThe start angle in degrees.
bnumberThe end angle in degrees.
tnumberThe interpolation value between the two floats. Clamped to the range [0, 1]

Returns:

typeDescription
numberThe interpolated float result between the two float values.

Usage

---@type number
local a;

---@type number
local b;

---@type number
local t;


local val0 = Mathf:LerpAngle(a, b, t)