Skip to content

Modern Math Floor

Paul Squires edited this page Oct 19, 2026 · 5 revisions

Home › Math Library › Math Library › Floor

Floor

Rounds down, towards negative infinity, so Floor(-2.1) is -3.

Syntax

Floor( x )

Examples

#import "std/numeric"
using numeric

print Floor( 2.7 )           '' 2
print Floor( -2.1 )          '' -3 -- TOWARDS NEGATIVE INFINITY, not zero

'' That is the difference from Truncate, and it is the whole reason both
'' exist
print Truncate( -2.1 )       '' -2

Library: Math Library
Category: Math Library
Documented under: Nothing Becomes A Keyword

Clone this wiki locally