ceil function math code example
Example 1: How does Math.ceil work
Math.ceil(x); //This equals the next whole number after x. X must be a double.
//Example use:
x = Math.ceil(x);
//Now x is equal to x rounded up.
Example 2: math ceil floor
//round up to the next highest value
Math.ceil(11.49); //12
//the greatest integer that is less than or equal to x
Math.floor(11.49); //11
Example 3: mathf.ceil
Mathf.Ceil(10.0F)