From: Robert Klemme Date: 2007-07-26T18:27:52+09:00 Subject: Re: How to truncate float number after dot? 2007/7/26, Pat Maddox : > On 7/26/07, Pat Maddox wrote: > > On 7/26/07, Marcin Tyman wrote: > > > Hi, > > > > > > How to truncate float number after dot? I suppose it would be easy. > > > > > > Thank in advance > > > MT > > > -- > > > > irb(main):001:0> 12.68.floor > > => 12 > > irb(main):002:0> 12.68.ceil > > => 13 > > > > Pat > > > > Gah, I forgot the all important round! > > irb(main):003:0> 12.68.round > => 13 > irb(main):004:0> 12.38.round > => 12 12.38.to_i robert