Skip to main content

Mathf.Sign(number f)

Returns the sign of f.

Parameters:

NameTypeDescription
fnumberValue

Returns:

typeDescription
numbervalue is 1 when f is positive or zero, -1 when f is negative.

Usage

---@type number
local f;


local val0 = Mathf:Sign(f)