×
A new build of Corona SDK is now available to subscribers. Not a subscriber? Subscribe now.
CoronaSDK 2014.2483 | Released: 31 Oct 2014, 1:37am | What's New | Download Now

math.ceil()

Description:

Returns the smallest integer larger than or equal to x.

Syntax:

math.ceil (x)

Example:

print (math.ceil(0.5))     ---> 1
print (math.ceil(-0.5))    ---> -0

Parameters:

x
A number.

Returns:

A number.

Remarks:
Supported on operating systems and platforms for build numbers shown:
  • Mac OS X:
    Corona SDK 1.0
  • Windows:
    Corona SDK 2.0
  • iOS:
    Corona SDK 1.0
  • Android:
    Corona SDK 2.0