We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I need a way to round up the remained in division. Would that be a good option for divRound?
The text was updated successfully, but these errors were encountered:
I don't need this anymore and don't have time to implement it ATM.
Sorry, something went wrong.
I'd like to reopen this. We found a need for divCeil in ethereumjs.
divCeil
This is the current code we have:
+// Find Ceil(`this` / `num`) +BN.prototype.divCeil = function divCeil (num) { + var dm = this.divmod(num) + + // Fast case - exact division + if (dm.mod.isZero()) return dm.div + + // Round up + return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1) +}
No branches or pull requests
I need a way to round up the remained in division. Would that be a good option for divRound?
The text was updated successfully, but these errors were encountered: