Re: [AD] use double for al_current_time and al_rest? |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: Coordination of admins/developers of the game programming library Allegro <alleg-developers@xxxxxxxxxx>
- Subject: Re: [AD] use double for al_current_time and al_rest?
- From: Elias Pschernig <elias@xxxxxxxxxx>
- Date: Thu, 27 Dec 2007 14:12:41 +0100
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>