Abs

Absolute value of a number. Drops the sign.

Category: Math Returns: matches the input type; see overloads.

Signature

Abs(value)

The runtime picks the overload that matches the argument type at evaluation time.

Overloads

ArgsReturnsNotes
(int)intInteger input; integer result.
(decimal)decimalDecimal input; decimal result.
(number)numberFallback when the input type can’t be statically resolved (variable inputs).

Examples

Abs(trust_change)                 // magnitude of a change, ignoring direction
Abs(player_x - target_x) < 3      // within 3 units on the X axis
Abs(-7)                           // 7
Docs last synced: 2026-07-08
Screenshot viewer