modulo¶
Hook for taking the modulo of an integer with optionally checking if it is equal to another number, 0 by default.
Inputs¶
Name | Type | Default | Required | Description |
---|---|---|---|---|
input | int | True | The input integer to take the modulo of. | |
divisor | int | True | The divisor to take the modulo with. | |
equal_to | int | None | None | False |
Arguments¶
Position | Argument | Type |
---|---|---|
1 | input | int |
2 | divisor | int |
3 | equal_to | int |
Returns¶
int | bool
Examples¶
Take the modulo of a number
odd->: modulo 5 2
even->: modulo 6 2
odd: 1
even: 0