Releases: PrestaShop/decimal
Releases · PrestaShop/decimal
1.5.0
1.4.0
1.3.0
This release adds a couple shorthand methods to perform comparisons with zero:
$a = new PrestaShop\Decimal\Number('777.777');
$a->equalsZero(); // returns false
$a->isLowerThanZero(); // returns false
$a->isLowerOrEqualThanZero(); // returns false
$a->isGreaterThanZero(); // returns true
$a->isGreaterOrEqualThanZero(); // returns true
1.2.0
This version adds support for creating Numbers using the scientific notation (as described in the PHP documentation), as well as floats without leading zero (e.g. .001
).
1.1.0
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 zeroesround()
- which always strips trailing zeroes
1.0.0
First stable release