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

math.floor()

math.floor(n) returns n rounded down.

Returns

  • if n is a number, returns the largest integer smaller than or equal to n.

  • if n is not a number, returns null.

Examples

# evaluates to 7
math.floor(7.7)
# evaluates to -3
math.floor(-2.1)

Last updated

Was this helpful?