For the complete documentation index, see llms.txt. This page is also available as Markdown.

math.abs()

math.abs(n) returns the absolute value of n.

Returns

  • if n is a number, returns the absolute value of n(i.e. it returns nif n >= 0, and -n if n < 0).

  • if n is not a number, returns null.

Last updated

Was this helpful?