Skip to content
New issue

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

let decimalPlaces accept negative values #262

Open
mikekap opened this issue May 14, 2020 · 2 comments
Open

let decimalPlaces accept negative values #262

mikekap opened this issue May 14, 2020 · 2 comments

Comments

@mikekap
Copy link

mikekap commented May 14, 2020

round in various other settings accepts negative decimal places for rounding left of the decimal point. e.g.

new BigNumber('1234.5').decimalPlaces(0) => 1235.0
new BigNumber('1234.5').decimalPlaces(-1) => 1230.0

Would you consider a patch to let bignumber.js do this?

@MikeMcl
Copy link
Owner

MikeMcl commented May 15, 2020

Yes, I would consider it.
It would need to be minimal and use ES3 syntax only.

Repository owner deleted a comment Sep 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@mikekap @MikeMcl and others