From: Coey Minear Date: 2007-10-27T04:35:47+09:00 Subject: Re: Rounding to the nearest 0.05 Peter Roome writes: > Hey guys. > > Having difficulty figuring out where to begin with trying to round a > calculation to the nearest 0.05. Can anyone offer any suggestions > please? > > Kind Regards > > Pete > -- > Posted via http://www.ruby-forum.com/. > Just off-hand, my initial reaction would be: (a * 20).round.to_f/20 where "a" is your variable. Some quick tests with irb seems to show this as working. Coey