User Tools

Site Tools


syntax:functions:floor

This is an old revision of the document!


Floor(number)

Category: Number function


Description

This function rounds number down to the nearest integer - or full, non-fractional number - towards negative infinity.


Arguments

ArgumentTypeDescription
numberNumberThe value, usually fractional, to be rounded.


Return value type: Number


Remarks

If the argument provided has any decimal portion, the whole number will be rounded down (towards negative infinity) to the next nearest whole number.


Examples

floor(10.0001) = 10
floor(10.5) = 10
floor(10.9999) = 10
floor(-10.0001) = -11  //Rounded down towards negative infinity
floor(-10.5) = -11  //Rounded down towards negative infinity
floor(-10.9999) = -11  //Rounded down towards negative infinity


See also

syntax/functions/floor.1627779082.txt.gz · Last modified: 2021/07/31 20:51 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki