floor

Returns the integer less than or equal to the input. This function is equivilant to the int function.

floor(number) → returns Integer

This function requires Adobe ColdFusion 2016 and up. Not supported on Lucee, OpenBD, etc.

Argument Reference for the floor function

number

Required: Yes
A numeric value

Examples sample code invoking the floor function


Floor Value of 4.0

Requires CF 2016+

floor(4.0)

Expected Result: 4


Floor Value of 4.3

Requires CF 2016+

floor(4.3)

Expected Result: 4


Floor Value of 4.7

Requires CF 2016+

floor(4.7)

Expected Result: 4


Floor Value of -4.3

Requires CF 2016+

floor(-4.3)

Expected Result: -4


Fork me on GitHub