Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!

ceil

From Quake Wiki

float ceil(float val)

Usage[edit]

Rounds the passed number up to the next highest whole number.

Parameters[edit]

  • val
The number to round up.

Return[edit]

Returns the rounded up number.

Example[edit]

// Add a random amount of stacks, guaranteeing it always adds at least one
float toAdd = random() * 5;
self.stacks += ceil(toAdd);