aboutsummaryrefslogtreecommitdiffstats
path: root/node_modules/math-intrinsics/mod.js
blob: 4a98362baf165d9190ab6bc7b627daeaad6fac8c (plain)
1
2
3
4
5
6
7
8
9
'use strict';

var $floor = require('./floor');

/** @type {import('./mod')} */
module.exports = function mod(number, modulo) {
	var remain = number % modulo;
	return $floor(remain >= 0 ? remain : remain + modulo);
};