summaryrefslogtreecommitdiffstats
path: root/src/common/math_util.h
diff options
context:
space:
mode:
authorJames Rowe <jroweboy@gmail.com>2016-11-10 08:36:07 +0100
committerJames Rowe <jroweboy@gmail.com>2016-11-12 18:49:47 +0100
commit793339b73a9bc87d6fa22742be4631565c2201db (patch)
tree5177fdef58d7cf99fded0d913072372a425cbe63 /src/common/math_util.h
parentAdd default hotkey to swap primary screens. (diff)
downloadyuzu-793339b73a9bc87d6fa22742be4631565c2201db.tar
yuzu-793339b73a9bc87d6fa22742be4631565c2201db.tar.gz
yuzu-793339b73a9bc87d6fa22742be4631565c2201db.tar.bz2
yuzu-793339b73a9bc87d6fa22742be4631565c2201db.tar.lz
yuzu-793339b73a9bc87d6fa22742be4631565c2201db.tar.xz
yuzu-793339b73a9bc87d6fa22742be4631565c2201db.tar.zst
yuzu-793339b73a9bc87d6fa22742be4631565c2201db.zip
Diffstat (limited to 'src/common/math_util.h')
-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 9e630d93d..cdeaeb733 100644
--- a/src/common/math_util.h
+++ b/src/common/math_util.h
@@ -45,8 +45,8 @@ struct Rectangle {
return Rectangle{left, top + y, right, bottom + y};
}
Rectangle<T> Scale(const float s) const {
- return Rectangle{left, top, static_cast<T>((right + left) * s),
- static_cast<T>((top + bottom) * s)};
+ return Rectangle{left, top, static_cast<T>(left + GetWidth() * s),
+ static_cast<T>(top + GetHeight() * s)};
}
};