Skip to content

Commit

Permalink
[ruby/bigdecimal] Set rounding mode in example
Browse files Browse the repository at this point in the history
  • Loading branch information
BurdetteLamar authored and mrkn committed Dec 23, 2021
1 parent de5c14d commit a8243d0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ext/bigdecimal/bigdecimal.c
Expand Up @@ -1891,6 +1891,8 @@ BigDecimal_div3(int argc, VALUE *argv, VALUE self)
*
* Examples:
*
* # Set the rounding mode.
* BigDecimal.mode(BigDecimal::ROUND_MODE, BigDecimal::ROUND_HALF_UP)
* BigDecimal('111111.111').add(1, 0) # => 0.111112111e6
* BigDecimal('111111.111').add(1, 2) # => 0.11e6
* BigDecimal('111111.111').add(1, 3) # => 0.111e6
Expand Down

0 comments on commit a8243d0

Please sign in to comment.