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'd like to understant how ROUND_HALF_UP works. Look at this example:
ROUND_HALF_UP
Big(23.45).times(0.21).toNumber() -> 4.9245 Big(23.45).times(0.21).round(3,1).toNumber() -> 4.925 Big(23.45).times(0.21).round(2,1).toNumber() -> 4.92
Don't the last case should be 4.93? Why is it 4.92?
4.93
4.92
The text was updated successfully, but these errors were encountered:
I already understand why is 4.92... but is there any way that 4.9245 will be rounded to 4.93?
4.9245
Sorry, something went wrong.
const ROUND = { DOWN: 0, HALF_UP: 1, HALF_EVEN: 2, UP: 3 }; Big(4.9245).round(2, ROUND.UP).toString(); // '4.93'
No branches or pull requests
I'd like to understant how
ROUND_HALF_UP
works. Look at this example:Don't the last case should be
4.93
? Why is it4.92
?The text was updated successfully, but these errors were encountered: