Skip to content

Commit 420ca46

Browse files
DelazJgithub-actions[bot]
authored andcommittedMar 7, 2023
Add more details to the modulo operator
1 parent 1d914df commit 420ca46

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed
 

‎resources/function_help/json/op_modulo

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "%",
33
"type": "operator",
44
"groups": ["Operators"],
5-
"description": "Remainder of division",
5+
"description": "Remainder of division. Takes the sign of the dividend.",
66
"arguments": [{
77
"arg": "a",
88
"description": "value"
@@ -11,11 +11,17 @@
1111
"description": "value"
1212
}],
1313
"examples": [{
14-
"expression": "5 % 4",
14+
"expression": "9 % 2",
1515
"returns": "1"
16+
}, {
17+
"expression": "9 % -2",
18+
"returns": "1"
19+
}, {
20+
"expression": "-9 % 2",
21+
"returns": "-1"
1622
}, {
1723
"expression": "5 % NULL",
1824
"returns": "NULL"
1925
}],
20-
"tags": ["division", "remainder"]
26+
"tags": ["division", "remainder", "modulo"]
2127
}

0 commit comments

Comments
 (0)