Integer.%
%that
Group: Operators
Aliases: modulo
, modulus
Documentation
Computes the remainder when dividing this by that.
Modulus in Enso will undergo automatic conversions such that you need not convert between Integer and Float manually. Returns an error if the shift amount exceeds 2^32.
Arguments
that
: The number to divide this by.
Examples
Computing the remainder when dividing 10 by 3 (which is 1).
10 % 3
Computing the remainder of a negative number.
-5 % 3 == -2
Remarks
Negative Arguments
When the first argument to %
is negative, the result will also be
negative.