diff --git a/Source/engine/displacement.hpp b/Source/engine/displacement.hpp index 46d346937..53741f2d0 100644 --- a/Source/engine/displacement.hpp +++ b/Source/engine/displacement.hpp @@ -44,8 +44,8 @@ struct Displacement { constexpr Displacement &operator*=(const float factor) { - deltaX *= factor; - deltaY *= factor; + deltaX = static_cast(deltaX * factor); + deltaY = static_cast(deltaY * factor); return *this; } diff --git a/Source/engine/point.hpp b/Source/engine/point.hpp index 1353c2242..f47fcde3c 100644 --- a/Source/engine/point.hpp +++ b/Source/engine/point.hpp @@ -44,8 +44,8 @@ struct Point { constexpr Point &operator*=(const float factor) { - x *= factor; - y *= factor; + x = static_cast(x * factor); + y = static_cast(y * factor); return *this; }