summaryrefslogtreecommitdiff
path: root/core/math
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-11-04 15:38:26 +0100
committerRémi Verschelde <rverschelde@gmail.com>2020-11-04 15:38:26 +0100
commit424cd00f8b14aa51aad82c52996740d7648ae691 (patch)
tree9517c56d9b9e0bacbf1c1955a31f6472ee573e55 /core/math
parent89f605c717e271050a6cc61547ea3d25996a19c4 (diff)
doc: Sync classref with current source + fixup some bindings
Includes various changes triggered by the refactoring of method bindings.
Diffstat (limited to 'core/math')
-rw-r--r--core/math/rect2.h12
1 files changed, 6 insertions, 6 deletions
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) {
}