diff --git a/src/SFML/Graphics/Transformable.cpp b/src/SFML/Graphics/Transformable.cpp index 418a9759d..b63eb52d8 100644 --- a/src/SFML/Graphics/Transformable.cpp +++ b/src/SFML/Graphics/Transformable.cpp @@ -71,7 +71,10 @@ void Transformable::setPosition(const Vector2f& position) //////////////////////////////////////////////////////////// void Transformable::setRotation(float angle) { - m_rotation = angle; + m_rotation = static_cast(fmod(angle, 360)); + if (m_rotation < 0) + m_rotation += 360.f; + m_transformNeedUpdate = true; m_inverseTransformNeedUpdate = true; }