Skip to content

Commit

Permalink
Add more details to the modulo operator
Browse files Browse the repository at this point in the history
  • Loading branch information
DelazJ authored and nyalldawson committed Mar 6, 2023
1 parent 35fc6b2 commit d979743
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions resources/function_help/json/op_modulo
Expand Up @@ -2,7 +2,7 @@
"name": "%",
"type": "operator",
"groups": ["Operators"],
"description": "Remainder of division",
"description": "Remainder of division. Takes the sign of the dividend.",
"arguments": [{
"arg": "a",
"description": "value"
Expand All @@ -11,11 +11,17 @@
"description": "value"
}],
"examples": [{
"expression": "5 % 4",
"expression": "9 % 2",
"returns": "1"
}, {
"expression": "9 % -2",
"returns": "1"
}, {
"expression": "-9 % 2",
"returns": "-1"
}, {
"expression": "5 % NULL",
"returns": "NULL"
}],
"tags": ["division", "remainder"]
"tags": ["division", "remainder", "modulo"]
}

0 comments on commit d979743

Please sign in to comment.