Floor

Rounds a number down to the nearest integer (towards negative infinity).

Category: Math Returns: int

Signature

Floor(value)

The argument can be an int (returns unchanged), decimal, or number. The result is always the greatest integer less than or equal to the input.

Examples

Floor(3.9)                      // 3
Floor(-3.1)                     // -4
Floor(score / divisor)          // integer division alternative
Floor(health / 100)             // whole hundreds of health

Notes

Floor rounds towards negative infinity, so Floor(-3.1) gives -4 (not -3). For truncation towards zero, use Int. For rounding to nearest, see Round.

Docs last synced: 2026-07-08
Screenshot viewer