I want to round BigDecimal in a ruby. I know I can use the round function, but
round function gives
(3.2).round(2) => 3.2
I want
(3.2).round(2) => 3.20 (3.20).round(2) => 3.20 (3).round(2) => 3.00 (3.578).round(2) => 3.58
I always want to have 2 decimal places, 3.20 not 3.2
any idea how to do this?
source share