summaryrefslogtreecommitdiff
path: root/modules/gdnative
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2020-12-19 21:32:14 +0100
committerGitHub <noreply@github.com>2020-12-19 21:32:14 +0100
commite9d12f9e4ea30a6c3f2cf179f104a153d668c2a3 (patch)
treef1d12e916b17a749335ef2e39151863e7d56280c /modules/gdnative
parent93acaca8ca0ae0cd369aa2ffa1a8f1128a08e42b (diff)
parent2df9a8ccadf3e7f99d767456eedb0e559c96572c (diff)
Merge pull request #44521 from madmiraal/rename-rect2-clip
Rename Rect2 and Rect2i clip() to intersection()
Diffstat (limited to 'modules/gdnative')
-rw-r--r--modules/gdnative/gdnative/rect2.cpp8
-rw-r--r--modules/gdnative/gdnative_api.json4
-rw-r--r--modules/gdnative/include/gdnative/rect2.h4
3 files changed, 8 insertions, 8 deletions
diff --git a/modules/gdnative/gdnative/rect2.cpp b/modules/gdnative/gdnative/rect2.cpp
index bacefced5d..0576fb569f 100644
--- a/modules/gdnative/gdnative/rect2.cpp
+++ b/modules/gdnative/gdnative/rect2.cpp
@@ -90,11 +90,11 @@ godot_bool GDAPI godot_rect2_has_no_area(const godot_rect2 *p_self) {
return self->has_no_area();
}
-godot_rect2 GDAPI godot_rect2_clip(const godot_rect2 *p_self, const godot_rect2 *p_b) {
+godot_rect2 GDAPI godot_rect2_intersection(const godot_rect2 *p_self, const godot_rect2 *p_b) {
godot_rect2 dest;
const Rect2 *self = (const Rect2 *)p_self;
const Rect2 *b = (const Rect2 *)p_b;
- *((Rect2 *)&dest) = self->clip(*b);
+ *((Rect2 *)&dest) = self->intersection(*b);
return dest;
}
@@ -233,11 +233,11 @@ godot_bool GDAPI godot_rect2i_has_no_area(const godot_rect2i *p_self) {
return self->has_no_area();
}
-godot_rect2i GDAPI godot_rect2i_clip(const godot_rect2i *p_self, const godot_rect2i *p_b) {
+godot_rect2i GDAPI godot_rect2i_intersection(const godot_rect2i *p_self, const godot_rect2i *p_b) {
godot_rect2i dest;
const Rect2i *self = (const Rect2i *)p_self;
const Rect2i *b = (const Rect2i *)p_b;
- *((Rect2i *)&dest) = self->clip(*b);
+ *((Rect2i *)&dest) = self->intersection(*b);
return dest;
}
diff --git a/modules/gdnative/gdnative_api.json b/modules/gdnative/gdnative_api.json
index 84b36b3745..b3fd033e6c 100644
--- a/modules/gdnative/gdnative_api.json
+++ b/modules/gdnative/gdnative_api.json
@@ -3573,7 +3573,7 @@
]
},
{
- "name": "godot_rect2_clip",
+ "name": "godot_rect2_intersection",
"return_type": "godot_rect2",
"arguments": [
["const godot_rect2 *", "p_self"],
@@ -3715,7 +3715,7 @@
]
},
{
- "name": "godot_rect2i_clip",
+ "name": "godot_rect2i_intersection",
"return_type": "godot_rect2i",
"arguments": [
["const godot_rect2i *", "p_self"],
diff --git a/modules/gdnative/include/gdnative/rect2.h b/modules/gdnative/include/gdnative/rect2.h
index f317afc9da..2c8f836d16 100644
--- a/modules/gdnative/include/gdnative/rect2.h
+++ b/modules/gdnative/include/gdnative/rect2.h
@@ -80,7 +80,7 @@ godot_bool GDAPI godot_rect2_encloses(const godot_rect2 *p_self, const godot_rec
godot_bool GDAPI godot_rect2_has_no_area(const godot_rect2 *p_self);
-godot_rect2 GDAPI godot_rect2_clip(const godot_rect2 *p_self, const godot_rect2 *p_b);
+godot_rect2 GDAPI godot_rect2_intersection(const godot_rect2 *p_self, const godot_rect2 *p_b);
godot_rect2 GDAPI godot_rect2_merge(const godot_rect2 *p_self, const godot_rect2 *p_b);
@@ -123,7 +123,7 @@ godot_bool GDAPI godot_rect2i_encloses(const godot_rect2i *p_self, const godot_r
godot_bool GDAPI godot_rect2i_has_no_area(const godot_rect2i *p_self);
-godot_rect2i GDAPI godot_rect2i_clip(const godot_rect2i *p_self, const godot_rect2i *p_b);
+godot_rect2i GDAPI godot_rect2i_intersection(const godot_rect2i *p_self, const godot_rect2i *p_b);
godot_rect2i GDAPI godot_rect2i_merge(const godot_rect2i *p_self, const godot_rect2i *p_b);