floor()

Returns the largest (closest to positive infinity) double value that is less than or equal to the value and is equal to a mathematical integer.

Syntax

Numeric floor()

Usage

Special cases:

  • If the value is already equal to a mathematical integer, then the result is the same as the value.
  • If the value is NaN or an infinity or positive zero or negative zero, then the result is the same as the value.