Skip to content
Subhajit Sahu edited this page Feb 2, 2021 · 15 revisions

Gets remainder of x/y with sign of x (truncated division). 📦 😺 🏃 📼 🌔 📜 📰 📘

Similar: rem, mod, modp.


math.rem(x, y);
// x: dividend
// y: divisor
const math = require("extra-math");

math.rem(1, 10);
// 1

math.rem(-1, 10);
// -1

math.rem(1, -10);
// 1


References

Clone this wiki locally