From: ChrisH Date: 2006-07-26T04:15:11+09:00 Subject: Re: Noob devision question jamiethehutt wrote: ... > totalbarsize = 180 > timeelapsed = 10 > totaltime = 30 > > percomplete = 0.0 > barlength = 0.0 > > percomplete = timeelapsed / totaltime > barlength = totalbarsize*percomplete > > puts barlength You need Floats all the way down. The division of Fixnum values ( timeelapsed / totaltime) produces a Fixnum value, which is 0 as 0.333 gets truncated put a .0 after all the non-Float values to force them to be Float