-
Notifications
You must be signed in to change notification settings - Fork 0
modp
Subhajit Sahu edited this page Aug 8, 2022
·
15 revisions
Find the remainder of x/y with +ve sign (euclidean division).
function modp(x, y)
// x: dividend
// y: divisor
const xmath = require('extra-math');
xmath.modp(1, 10);
// → 1
xmath.modp(-1, 10);
// → 9
xmath.modp(1, -10);
// → 1