Get the absolute value of a number

Verified
Added by iNTERFACEWARE

Return the absolute value of a number, using math.abs()

Source Code
-- get the absolute value of a number
local abs = math.abs(-99)
trace(abs)
Description
Return the absolute value of a number, using math.abs()
Usage Details

Demonstrates how return the absolute value of a number, by using math.abs().

How to use the snippet:

  • Paste the code into your script