summaryrefslogtreecommitdiff
path: root/core/math/math_2d.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/math/math_2d.h')
-rw-r--r--core/math/math_2d.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/math/math_2d.h b/core/math/math_2d.h
index 60351445c0..bbef19de7a 100644
--- a/core/math/math_2d.h
+++ b/core/math/math_2d.h
@@ -336,9 +336,10 @@ struct Rect2 {
g.size.height += p_by * 2;
return g;
}
+
inline Rect2 grow_margin(Margin p_margin, real_t p_amount) const {
Rect2 g = *this;
- g.grow_individual((MARGIN_LEFT == p_margin) ? p_amount : 0,
+ g = g.grow_individual((MARGIN_LEFT == p_margin) ? p_amount : 0,
(MARGIN_TOP == p_margin) ? p_amount : 0,
(MARGIN_RIGHT == p_margin) ? p_amount : 0,
(MARGIN_BOTTOM == p_margin) ? p_amount : 0);