Function group | Execute on client | Platform(s) |
---|---|---|
Number | YES | All |
mod(number1,number2)
Returns the remainder of a number division, that is, when number1 is divided by number2 to produce a remainder; it is a true modulus function.
mod() checks for integer arguments, and if so uses integer rather than floating point operations to determine its result. The result is still returned as a number rather than an integer.
Calculate lResult as mod(6,4)
# returns 2
Calculate lResult as mod(4,6)
# returns 4
Calculate lResult as mod(-5,-2)
# returns -1