Skip to main content

Mathf.DeltaAngle(number current, number target)

Calculates the shortest difference between two given angles given in degrees.

Parameters:

NameTypeDescription
currentnumbercurrent
targetnumbertarget

Returns:

typeDescription
numbershortest difference between two given angles given in degrees.

Usage

---@type number
local current;

---@type number
local target;


local val0 = Mathf:DeltaAngle(current, target)