CoronaSDK 2013.1126 | Released: 24 May 2013, 1:59am | What's New | Download Now
These docs are *very* out of date.
You will be redirected to the new docs in a few seconds.
If you are certain you want to see the old docs, click cancel.
Cancel | Continue to new docs
You will be redirected to the new docs in a few seconds.
If you are certain you want to see the old docs, click cancel.
Cancel | Continue to new docs
math.fmod()
Description:
Returns the remainder of the division of the arguments that rounds the quotient towards zero.
The remainder of a division operation is the result of subtracting the integral quotient multiplied by the denominator from the numerator:
remainder = numerator - quotient * denominator
Syntax:
math.fmod (x, y)
Example:
print (math.fmod(5.3, 2)) ---> 1.3 print (math.fmod(1, 0)) ---> nan
Parameters:
x
The division numerator.
y
The division denominator.
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