VideoCommon: remove unnecessary floor()

floatindex is clamped to the range [0, 9]. For non-negative numbers
floor() is equivalent to trunc(). Truncation happens implicitly when
converting to uint, so the floor() is unnecessary.
This commit is contained in:
Tillmann Karras 2018-09-19 04:30:31 +01:00
parent 31594a8138
commit 56fdcf5f00
3 changed files with 3 additions and 3 deletions

View file

@ -780,7 +780,7 @@ void Tev::Draw()
floatindex = MathUtil::Clamp(floatindex, 0.f, 9.f); // TODO: This shouldn't be necessary!
// Get the two closest integer indices, look up the corresponding samples
const int indexlower = (int)floor(floatindex);
const int indexlower = (int)floatindex;
const int indexupper = indexlower + 1;
// Look up coefficient... Seems like multiplying by 4 makes Fortune Street work properly (fog
// is too strong without the factor)