ceil
Returns the smallest integer greater than or equal to the input. If the input is already an integer, it is returned as-is.
Syntax
ceil(value)or chained:
<number>.ceil()Arguments
value (
int | float, optional when chained) - The number to ceil.
Examples
Round up a positive float
ceil(3.2)
// 4Negative values round toward zero
ceil(-2.7)
// -2Integer input unchanged
ceil(5)
// 5CLI usage
Last updated