summaryrefslogtreecommitdiffstats
path: root/src/common/math_util.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/common/math_util.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/math_util.h b/src/common/math_util.h
index 4c38d8040..510c4e56d 100644
--- a/src/common/math_util.h
+++ b/src/common/math_util.h
@@ -48,8 +48,8 @@ struct Rectangle {
}
[[nodiscard]] Rectangle<T> Scale(const float s) const {
- return Rectangle{left, top, static_cast<T>(left + GetWidth() * s),
- static_cast<T>(top + GetHeight() * s)};
+ return Rectangle{left, top, static_cast<T>(static_cast<float>(left + GetWidth()) * s),
+ static_cast<T>(static_cast<float>(top + GetHeight()) * s)};
}
};