- Slight optimisation to I_GetInputFrac() by multiplying by inverse instead of dividing on a constant.

This commit is contained in:
Mitch Richters 2021-12-07 20:02:11 +11:00
parent cb91e23c75
commit 7f1b8402d1

View file

@ -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
{