User Guide

426 Chapter 2: ActionScript Language Reference
Math.ceil()
Availability
Flash Player 5. In Flash Player 4, the methods and properties of the Math class are emulated using
approximations and might not be as accurate as the non-emulated math functions that Flash
Player 5 supports.
Usage
Math.ceil(x:Number) : Number
Parameters
x
A number or expression.
Returns
An integer that is both closest to, and greater than or equal to, parameter x.
Description
Method; returns the ceiling of the specified number or expression. The ceiling of a number is the
closest integer that is greater than or equal to the number.
Example
The following code returns a value of 13:
Math.ceil(12.5);
See also
Math.floor(), Math.round()