mirror of
https://github.com/DrBeef/Raze.git
synced 2025-03-30 20:51:22 +00:00
- Slight optimisation to I_GetInputFrac()
by multiplying by inverse instead of dividing on a constant.
This commit is contained in:
parent
cb91e23c75
commit
7f1b8402d1
1 changed files with 2 additions and 2 deletions
|
@ -213,8 +213,8 @@ double I_GetInputFrac(bool const synchronised, double const ticrate)
|
|||
// This rectifies a deviation of 100+ ms or more depending on the length
|
||||
// of the operation to be within 1-2 ms of synchronised input
|
||||
// from 60 fps to at least 1000 fps at ticrates of 30 and 40 Hz.
|
||||
const double result = elapsedInputTicks * ticrate / 1000.;
|
||||
return result * (1. + 0.35 * (1. - ticrate / 50.) * (1. - result));
|
||||
const double result = elapsedInputTicks * ticrate * (1. / 1000.);
|
||||
return result * (1. + 0.35 * (1. - ticrate * (1. / 50.)) * (1. - result));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue