From 56fdcf5f00a8066617ae738652ab041614b0938a Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Wed, 19 Sep 2018 04:30:31 +0100 Subject: 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. --- Source/Core/VideoBackends/Software/Tev.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/VideoBackends/Software/Tev.cpp') 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) -- cgit v1.2.3