-
Notifications
You must be signed in to change notification settings - Fork 0
mod
Subhajit Sahu edited this page Jul 29, 2022
·
15 revisions
Finds remainder of x/y with sign of y (floored division).
mod(x, y);
// x: dividend
// y: divisor
const {mod} = require('extra-math');
mod(1, 10);
// → 1
mod(-1, 10);
// → 9
mod(1, -10);
// → -9