mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-11 16:49:28 +02:00
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:
@ -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)
|
||||
|
Reference in New Issue
Block a user