abs( num )

Returns the absolute value of a number.

The number.

The absolute value of a number is a number with the same magnitude, ignoring the sign.

Examples Edit

print(abs(3.1))   -- 3.1

print(abs(-3.1))  -- 3.1

print(abs(0))     -- 0

See also Edit

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.