From: brabuhr@... Date: 2010-01-23T11:37:02+09:00 Subject: Re: why is rails/ruby automatically rounding to whole numbers. On Fri, Jan 22, 2010 at 9:02 PM, Morgan Morgan wrote: > Morgan Morgan wrote: >>       @wtf= 751 / 750 >>      returns 1 in the view >> >>       @wtf= 3 / 750 >>      returns 0 in the view >> >> i'm just trying to calculate percents. > > Apparently if you add a .0 it turns it into a precise number http://www.ruby-doc.org/docs/ProgrammingRuby/html/tut_stdtypes.html $ irb irb(main):001:0> 1.class => Fixnum irb(main):002:0> 1.0.class => Float