mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-28 23:38:49 +00: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:
parent
31594a8138
commit
56fdcf5f00
3 changed files with 3 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue