summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Software/Tev.cpp
diff options
context:
space:
mode:
authorTillmann Karras <tilkax@gmail.com>2018-09-19 04:30:31 +0100
committerTillmann Karras <tilkax@gmail.com>2018-10-09 00:31:43 +0100
commit56fdcf5f00a8066617ae738652ab041614b0938a (patch)
tree27ea67ace40234c2bd47c3d3f7f47d3c4d8ae320 /Source/Core/VideoBackends/Software/Tev.cpp
parent31594a81388d08f4989cf7031062d023b78f88ed (diff)
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.
Diffstat (limited to 'Source/Core/VideoBackends/Software/Tev.cpp')
-rw-r--r--Source/Core/VideoBackends/Software/Tev.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/VideoBackends/Software/Tev.cpp b/Source/Core/VideoBackends/Software/Tev.cpp
index 0d96d16506..4b7c41347c 100644
--- a/Source/Core/VideoBackends/Software/Tev.cpp
+++ b/Source/Core/VideoBackends/Software/Tev.cpp
@@ -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)