Skip to content
wolfram77 edited this page Mar 31, 2020 · 15 revisions

Gets remainder of x/y with sign of x (truncated division).

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