eric sciple ae5dcb46c8 .
2020-01-24 12:30:26 -05:00

5 lines
142 B
JavaScript

module.exports = function mod(number, modulo) {
var remain = number % modulo;
return Math.floor(remain >= 0 ? remain : remain + modulo);
};