Api > Mathf > LerpAngle()
Same as Lerp but makes sure the values interpolate correctly when they wrap around 360 degrees.
Parameters:
Name |
Type |
Description |
a |
number |
The start angle in degrees. |
b |
number |
The end angle in degrees. |
t |
number |
The interpolation value between the two floats. Clamped to the range [0, 1] |
Returns:
type |
Description |
number |
The 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)