Implemented with the % operator, so it follows the JavaScript specification
that the sign of a % b is the sign of a, and values are not required
to be integers. See mathModulo for a function that follows Knuth's
definition, better reflecting the use of mod in mathematics.
Implemented with the
%
operator, so it follows the JavaScript specification that the sign ofa % b
is the sign ofa
, and values are not required to be integers. See mathModulo for a function that follows Knuth's definition, better reflecting the use of mod in mathematics.Example