iceil

Syntax

int ceil(double number)

Arguments

number
Any double or float number.

Return

The rounded value, as an integer.

Description

Returns the smallest integral value greater than or equal to number, as an integer.

Example

%ffp

OnFilterStart:
{
  // This should give 3
  Info("Rounding 2.345 to ceiling gives %d", iceil(2.345));

  // This should give -2
  Info("Rounding -2.345 to ceiling gives %d", iceil(-2.345));
}

See Also

ceil, ichop, ifloor, iround