ceil (Math.ceil method)

public static ceil(x:Number) : Number

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.

Availability: ActionScript 1.0; 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.

Parameters

x:Number - A number or expression.

Returns

Number - An integer that is both closest to, and greater than or equal to, parameter x.

Example

The following code returns a value of 13:

Math.ceil(12.5);

See also

floor (Math.floor method), round (Math.round method)


Flash CS3