I want to round a BigDecimal in ruby. I know I can use the round function but
the 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 get this done ?
try this: