@extra-math/rem.min

Finds remainder of x/y with sign of x (truncated division). :package: :smiley_cat: :running: :vhs: :moon: :scroll: :newspaper: :blue_book:

Usage no npm install needed!

<script type="module">
  import extraMathRemMin from 'https://cdn.skypack.dev/@extra-math/rem.min';
</script>

README

Finds remainder of x/y with sign of x (truncated division). :package: :smiley_cat: :running: :vhs: :moon: :scroll: :newspaper: :blue_book:

Similar: rem, mod, modp.

This is part of package extra-math.

This is browserified, minified version of @extra-math/rem.
It is exported as global variable math_rem.
CDN: unpkg, jsDelivr.


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