For example, my current code is
>def grow days
>    while days != 0
>      growheight = rand(5) / 100.0
>      @height = @height + growheight
>      days = days - 1
>    end
>end
If days is a large number, say a year, it usually ends up with a number
like 7.4799999999999999984. Is there a way to fix this? Perhaps chopping
off after 2 decimal places in a string? Thanks in advance!

-- 
Posted via http://www.ruby-forum.com/.