From 424cd00f8b14aa51aad82c52996740d7648ae691 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 4 Nov 2020 15:38:26 +0100 Subject: doc: Sync classref with current source + fixup some bindings Includes various changes triggered by the refactoring of method bindings. --- core/math/rect2.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'core/math') diff --git a/core/math/rect2.h b/core/math/rect2.h index 4e6cecaab2..5a746aa732 100644 --- a/core/math/rect2.h +++ b/core/math/rect2.h @@ -367,8 +367,8 @@ struct Rect2i { new_rect.position.x = MAX(p_rect.position.x, position.x); new_rect.position.y = MAX(p_rect.position.y, position.y); - Point2 p_rect_end = p_rect.position + p_rect.size; - Point2 end = position + size; + Point2i p_rect_end = p_rect.position + p_rect.size; + Point2i end = position + size; new_rect.size.x = (int)(MIN(p_rect_end.x, end.x) - new_rect.position.x); new_rect.size.y = (int)(MIN(p_rect_end.y, end.y) - new_rect.position.y); @@ -390,7 +390,7 @@ struct Rect2i { return new_rect; } - bool has_point(const Point2 &p_point) const { + bool has_point(const Point2i &p_point) const { if (p_point.x < position.x) { return false; } @@ -485,10 +485,10 @@ struct Rect2i { size(p_r2.size) { } Rect2i(int p_x, int p_y, int p_width, int p_height) : - position(Point2(p_x, p_y)), - size(Size2(p_width, p_height)) { + position(Point2i(p_x, p_y)), + size(Size2i(p_width, p_height)) { } - Rect2i(const Point2 &p_pos, const Size2 &p_size) : + Rect2i(const Point2i &p_pos, const Size2i &p_size) : position(p_pos), size(p_size) { } -- cgit v1.2.3