Re: [AD] use double for al_current_time and al_rest?

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Thu, 2007-12-27 at 10:03 -0300, Victor wrote:
> Float and double suffers from rounding errors. Is this a issue for
> al_current_time(void)?
> 

I couldn't think of an example where it is a problem. But it is actually
related to why I wanted the change - resulting from a simple programming
mistake:

al_rest(last_time + 1000.0 / 60.0)

This was supposed to time the game at 60 FPS, but really timed it at
62.5 FPS, leading to all kinds of follow up problems.

-- 
Elias Pschernig <elias@xxxxxxxxxx>





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/