Skip to content

Api > Mathf > Sign()


Mathf.Sign(number f)⚓︎

Returns the sign of f.

Parameters:⚓︎

Name Type Description
f number Value

Returns:⚓︎

type Description
number value is 1 when f is positive or zero, -1 when f is negative.

Usage⚓︎

---@type number
local f;


local val0 = Mathf:Sign(f)