Skip to content

Commit 42c999f

Browse files
BurdetteLamarmrkn
authored andcommitted
Set rounding mode in example
1 parent 0de9298 commit 42c999f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ext/bigdecimal/bigdecimal.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1891,6 +1891,8 @@ BigDecimal_div3(int argc, VALUE *argv, VALUE self)
18911891
*
18921892
* Examples:
18931893
*
1894+
* # Set the rounding mode.
1895+
* BigDecimal.mode(BigDecimal::ROUND_MODE, BigDecimal::ROUND_HALF_UP)
18941896
* BigDecimal('111111.111').add(1, 0) # => 0.111112111e6
18951897
* BigDecimal('111111.111').add(1, 2) # => 0.11e6
18961898
* BigDecimal('111111.111').add(1, 3) # => 0.111e6

0 commit comments

Comments
 (0)