-
Notifications
You must be signed in to change notification settings - Fork 2
roundDiv
Subhajit Sahu edited this page Aug 9, 2022
·
1 revision
Perform rounded-divison of two bigints.
function roundDiv(x, y)
// x: divisor
// y: dividend
const xbigint = require('extra-bigint');
xbigint.roundDiv(15n, 4n);
// → 4n
xbigint.roundDiv(2n, 2n);
// → 1n
xbigint.roundDiv(-15n, 4n);
// → -4n