Hello,
It is not an issue, but a question.
As you may know, JavaScript and decimal it's not great love.
So if you do 0.1 + 0.2 the result will be 0.30000000000000004 .
Currently, in your library you are using native representation of numbers, so such issue could arise (which is fine me).
However, there is no easy way to replace the default behaviour. So I had to duplicate the unit.ts and adapt it to use decimal.js.
Do you plan to offer a way to have better integration with libraries such as decimal.js ?
P.S. Don't hesitate to edit the title of the issue.
Hello,
It is not an issue, but a question.
As you may know, JavaScript and decimal it's not great love.
So if you do
0.1 + 0.2the result will be0.30000000000000004.Currently, in your library you are using native representation of numbers, so such issue could arise (which is fine me).
However, there is no easy way to replace the default behaviour. So I had to duplicate the
unit.tsand adapt it to use decimal.js.Do you plan to offer a way to have better integration with libraries such as
decimal.js?P.S. Don't hesitate to edit the title of the issue.