mirror of
https://github.com/danog/math.git
synced 2024-11-26 20:04:46 +01:00
Fix BigDecimal::dividedBy() example
This commit is contained in:
parent
c642d0d0c9
commit
a93fc20205
@ -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:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user