summaryrefslogtreecommitdiffstats
path: root/core/math/geometry_2d.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/math/geometry_2d.h')
-rw-r--r--core/math/geometry_2d.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/core/math/geometry_2d.h b/core/math/geometry_2d.h
index fbcaa018a8..1502b2807c 100644
--- a/core/math/geometry_2d.h
+++ b/core/math/geometry_2d.h
@@ -377,10 +377,8 @@ public:
Vector2 further_away_opposite(1e20, 1e20);
for (int i = 0; i < c; i++) {
- further_away.x = MAX(p[i].x, further_away.x);
- further_away.y = MAX(p[i].y, further_away.y);
- further_away_opposite.x = MIN(p[i].x, further_away_opposite.x);
- further_away_opposite.y = MIN(p[i].y, further_away_opposite.y);
+ further_away = further_away.max(p[i]);
+ further_away_opposite = further_away_opposite.min(p[i]);
}
// Make point outside that won't intersect with points in segment from p_point.