mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Fix floating point math
This commit is contained in:
parent
91a89d5d5e
commit
c2e242d27c
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…
Add table
Reference in a new issue