Skip to content

1.1.0

Choose a tag to compare

@eternoendless eternoendless released this 22 Aug 14:27
· 47 commits to develop since this release

This minor version fixes an ambiguity in the way trailing zeroes are handled by Decimal.

BCMath always returns trailing zeroes whereas Decimal 1.0 always strips them, unless the requested precision is greater than the number's (in that case it adds trailing zeroes).

We fixed that ambiguity by exposing two methods instead of one:

  • toPrecision() - which always returns trailing zeroes
  • round() - which always strips trailing zeroes