1
0
mirror of https://github.com/danog/math.git synced 2024-11-27 04:14:40 +01:00

Fix BigDecimal::dividedBy() example

This commit is contained in:
Benjamin Morel 2015-06-05 10:19:23 +02:00
parent c642d0d0c9
commit a93fc20205

View File

@ -97,8 +97,8 @@ In that case, you need to explicitly provide a rounding mode:
When dividing a `BigDecimal`, you can also specify the scale of the result:
echo BigDecimal::of(3)->dividedBy(11, 2, RoundingMode::UP); // 0.28
echo BigDecimal::of(3)->dividedBy(11, 6, RoundingMode::DOWN); // 0.272727
echo BigDecimal::of(3)->dividedBy(11, RoundingMode::UP, 2); // 0.28
echo BigDecimal::of(3)->dividedBy(11, RoundingMode::DOWN, 6); // 0.272727
There are a number of rounding modes you can use: