From: Pat Maddox Date: 2007-07-26T18:14:52+09:00 Subject: Re: How to truncate float number after dot? 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 > > -- > > Posted via http://www.ruby-forum.com/. > > > > > > > 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 Pat