ceil

Round up

Definition

int ceil(number $value)

Returns the least integer that is greater or equal to $value.

Parameters

number $value

The value to calculate the ceiling of.

Returns

int

The smallest integer that is greater or equal to $value.

Examples

{
  a: ceil(`1.1`),
  b: ceil(`-1.1`),
  c: ceil(`false`),
  d: ceil(`null`),
  e: ceil(`[]`),       // Error
  f: ceil(`{}`),       // Error
  g: ceil('a')         // Error
}
{
  "a": 2,
  "b": -1,
  "c": 0,
  "d": 0
}