currency.js icon indicating copy to clipboard operation
currency.js copied to clipboard

Allow to specify rounding in `multiply` method

Open jtomaszewski opened this issue 4 years ago • 1 comments

Our use case: Let's say we have 0.25 USD amount, from which we are calculating fee 2% . That would equal to 0.25 * 0.02 = 0.0005 USD which is half of cent.

currency.js currently rounds that up to 0.01 USD

We would however in some cases prefer it to round down (to 0 USD).

How can we influence currency.js so that it uses different way of rounding to the nearest cent?

jtomaszewski avatar May 25 '21 23:05 jtomaszewski

No answer on this?

georgeben avatar Apr 23 '23 21:04 georgeben