We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Find the remainder of x/y with sign of x (truncated division).
Similar: rem, mod, modp.
function rem(x, y) // x: dividend // y: divisor
const xmath = require('extra-math'); xmath.rem(1, 10); // → 1 xmath.rem(-1, 10); // → -1 xmath.rem(1, -10); // → 1