Skip to content

Correction to Precision for Decimals

Choose a tag to compare

@rabrowne85 rabrowne85 released this 15 Jan 16:32
· 26 commits to master since this release

When using the precision flag in decimals, it now prints to this precision with padding as needed.

echo(Copper\Copper::create(123.456)->decimal(2)) // -> 123.46
echo(Copper\Copper::create(123.4)->decimal(2)) // -> 123.40
echo(Copper\Copper::create(123)->decimal(3)) // -> 123.000