2007/7/26, Pat Maddox <pergesu / gmail.com>:
> On 7/26/07, Pat Maddox <pergesu / gmail.com> wrote:
> > On 7/26/07, Marcin Tyman <m.tyman / interia.pl> 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