Q:

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.
2

New to Communities?

Join the community