ceil
mathRounds up to the nearest integer
Syntax
ceil(number) Parameters
number (number) The number to round up
Returns
number The smallest integer greater than or equal to the input
Examples
Input:
3.2 | ceil Output:
4 Input:
-2.7 | ceil Output:
-2 Input:
ceil(1.1) Output:
2 The ceil() function rounds up to the nearest integer, always moving toward positive infinity.
Usage
Use ceil() when you need to round up values, such as calculating required resources or ensuring minimum quantities.