summaryrefslogtreecommitdiff
path: root/core/fxcrt
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcrt')
-rw-r--r--core/fxcrt/fx_coordinates.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/fxcrt/fx_coordinates.cpp b/core/fxcrt/fx_coordinates.cpp
index d25a754d7a..bd06ce1473 100644
--- a/core/fxcrt/fx_coordinates.cpp
+++ b/core/fxcrt/fx_coordinates.cpp
@@ -136,8 +136,8 @@ FX_RECT CFX_FloatRect::GetClosestRect() const {
}
CFX_FloatRect CFX_FloatRect::GetCenterSquare() const {
- float fWidth = right - left;
- float fHeight = top - bottom;
+ float fWidth = Width();
+ float fHeight = Height();
float fHalfWidth = (fWidth > fHeight) ? fHeight / 2 : fWidth / 2;
float fCenterX = (left + right) / 2.0f;