util.math.modulo
Returns the result of the value
modulo modulus
.
def util.math.modulo(
value: dec or int = None, # Required
modulus: dec or int = None, # Required
):
Returns dec
if one or more of the operands is a dec
, or int
if both operands are int
.
Example:
# foo == dec(2)
foo = util.math.modulo(value=5, modulus=3)
# foo == int(2)
foo = util.math.modulo(value=int(5), modulus=int(3))
# foo == dec(2.5)
foo = util.math.modulo(value=5.5, modulus=3)