Reputation: 1401
Where x
is any integer, I have a value about x.1..x.4
. I want to round it to x.5
, and if it is above x.5
, say x.7
or x.8
, then it should round to (x+1).0
. How is that possible? Is there a function in ruby?
Upvotes: 3
Views: 1526