From 8e0b80aa369df7d1142053f077df928106c6ce8c Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Wed, 4 Apr 2018 07:42:40 +0200 Subject: Fix last performance-type-promotion-in-math-fn problems --- src/game.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/game.cpp') diff --git a/src/game.cpp b/src/game.cpp index 9a7f4e6d7..3d11ddbaa 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -3131,9 +3131,9 @@ PointedThing Game::updatePointedThing( // Modify final color a bit with time u32 timer = porting::getTimeMs() % 5000; float timerf = (float) (irr::core::PI * ((timer / 2500.0) - 0.5)); - float sin_r = 0.08 * sin(timerf); - float sin_g = 0.08 * sin(timerf + irr::core::PI * 0.5); - float sin_b = 0.08 * sin(timerf + irr::core::PI); + float sin_r = 0.08f * std::sin(timerf); + float sin_g = 0.08f * std::sin(timerf + irr::core::PI * 0.5f); + float sin_b = 0.08f * std::sin(timerf + irr::core::PI); c.setRed(core::clamp(core::round32(c.getRed() * (0.8 + sin_r)), 0, 255)); c.setGreen(core::clamp(core::round32(c.getGreen() * (0.8 + sin_g)), 0, 255)); c.setBlue(core::clamp(core::round32(c.getBlue() * (0.8 + sin_b)), 0, 255)); -- cgit v1.2.3