mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
Fix floating point math
This commit is contained in:
parent
515d7eeb9e
commit
c0dbc562bb
1 changed files with 2 additions and 2 deletions
|
@ -2067,7 +2067,7 @@ precise_t I_GetPreciseTime(void)
|
|||
|
||||
int I_PreciseToMicros(precise_t d)
|
||||
{
|
||||
return d / (timer_frequency / 1000000);
|
||||
return (int)(d / (timer_frequency / 1000000.0));
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -2078,7 +2078,7 @@ void I_StartupTimer(void)
|
|||
timer_frequency = SDL_GetPerformanceFrequency();
|
||||
tic_epoch = SDL_GetPerformanceCounter();
|
||||
|
||||
tic_frequency = timer_frequency / NEWTICRATE;
|
||||
tic_frequency = timer_frequency / (double)NEWTICRATE;
|
||||
}
|
||||
|
||||
void I_Sleep(void)
|
||||
|
|
Loading…
Reference in a new issue