From: David Alan Black Date: 2001-10-26T07:00:41+09:00 Subject: [ruby-talk:23365] Re: prog help Hello -- On Fri, 26 Oct 2001, Steven Thomas wrote: > How can I get a float to round to the hundredth 0.009 -> 0.01? Pending an answer from someone who knows what they're doing with float manipulation... would something like this be sufficient? irb 3> class Float; def to_hund; (self * 100.0).round / 100.0 end; end ==>nil irb 4> 0.009.to_hund ==>0.01 David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav