×
A new build of Corona SDK is now available to subscribers. Not a subscriber? Subscribe now.
CoronaSDK 2014.2437 | Released: 16 Sep 2014, 5:47pm | What's New | Download Now

math.floor()

Description:

Returns the greatest integer no greater than the given value.

Syntax:

math.floor (x)

Example:

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

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