Flash Lite 2.x and 3.0 ActionScript Language Reference

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.

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)