I\'m getting numbers like
2.36363636363636 4.567563 1.234566465448465 10.5857447736
How would I get Ruby to round these numbers up (or dow
Ruby 2 now has a round function:
# Ruby 2.3 (2.5).round 3 # Ruby 2.4 (2.5).round 2
There are also options in ruby 2.4 like: :even, :up and :down e.g;
2.4
:even
:up
:down
(4.5).round(half: :up) 5