ceil()

Returns the smallest (closest to negative infinity) double value that is greater than or equal to the value and is equal to a mathematical integer.

Syntax

ceil()

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.
  • If the value is less than zero but greater than -1.0, then the result is negative zero.
Note: The value of Numeric.ceil(x) is exactly the value of -Numeric.floor(-x).