From: Morgan Morgan Date: 2010-01-23T11:02:14+09:00 Subject: Re: why is rails/ruby automatically rounding to whole numbers. Morgan Morgan wrote: > @wtf= 751 / 750 > > returns 1 in the view > > @wtf= 3 / 750 > > returns 0 in the view > > @wtf= 749 / 750 > > returns 0 in the view. > > > can somebody explain what's going on here. i'm just trying to calculate > percents. Apparently if you add a .0 it turns it into a precise number -- Posted via http://www.ruby-forum.com/.