From fbc866c5c9c64370a2f4b83ce234843deecec047 Mon Sep 17 00:00:00 2001 From: kimci86 Date: Wed, 15 Dec 2021 13:07:34 +0100 Subject: [PATCH] Fix regression in shader example --- examples/shader/Shader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); }