diff --git a/examples/shader/Shader.cpp b/examples/shader/Shader.cpp index 3e885fd3e..7cb8cd79c 100644 --- a/examples/shader/Shader.cpp +++ b/examples/shader/Shader.cpp @@ -228,8 +228,8 @@ public: for (std::size_t i = 0; i < m_entities.size(); ++i) { sf::Vector2f position; - position.x = std::cos(0.25f * (time * static_cast(i + (m_entities.size() - i)))) * 300 + 350; - position.y = std::sin(0.25f * (time * static_cast((m_entities.size() - i) + i))) * 200 + 250; + position.x = std::cos(0.25f * (time * static_cast(i) + static_cast(m_entities.size() - i))) * 300 + 350; + position.y = std::sin(0.25f * (time * static_cast(m_entities.size() - i) + static_cast(i))) * 200 + 250; m_entities[i].setPosition(position); }