$modulus
Welcome to our Knowledge Base
Documentation | Blog | Demos | Support
< All Topics
Print
$modulus
0 out of 5 stars
5 Stars | 0% | |
4 Stars | 0% | |
3 Stars | 0% | |
2 Stars | 0% | |
1 Stars | 0% |
Calculates one number modulo another.
Syntax
$modulus(expr1,expr2)
Parameters
expr1 | a number, or an expression that evaluates to a number |
expr2 | a number, or an expression that evaluates to a number |
Return Value
Number, with no decimal places.
Comments
Expr1 modulo expr2 is the remainder of the division of expr1 by expr2.
Before the operation is carried out, expr1 and expr2 are rounded, if necessary, to yield integer values.
Example
$modulus(5,2)
Evaluates to 1.
$modulus(5.2,2.43)
Evaluates to 1.
$modulus(Age,10)
Evaluates to 4 if Age is 54.
See Also
Updated
ByJason Lee
Was this article helpful?
0 out of 5 stars
5 Stars | 0% | |
4 Stars | 0% | |
3 Stars | 0% | |
2 Stars | 0% | |
1 Stars | 0% |
5