Jump to content

Ceil()

From OpenBOR

Accepts a numeric value and returns the smallest integer greater than or equal to the input using the C ceil() function. Rounding proceeds upward toward positive infinity.

For example, ceil(-3.8) returns -3.

float input = 3.2;

int result = ceil(input);

// result = 4