summaryrefslogtreecommitdiffstats
path: root/core/math/vector2.h
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-05-07 20:46:06 +0200
committerGitHub <noreply@github.com>2021-05-07 20:46:06 +0200
commitc3f7465b7efe233eaa8945e41f4029840c1aa153 (patch)
tree9cdd0f36cc124ee47214e0a0f454b97fa82f6d37 /core/math/vector2.h
parent8976594f4b90edd42a926e483815c829a540d8d2 (diff)
parenta3dda2df85bf3e3ef82dbe1c2377640b9f3fd9c0 (diff)
downloadredot-engine-c3f7465b7efe233eaa8945e41f4029840c1aa153.tar.gz
Merge pull request #48535 from groud/tiles_squashed
TileSet and TileMap rework (squashed)
Diffstat (limited to 'core/math/vector2.h')
-rw-r--r--core/math/vector2.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/math/vector2.h b/core/math/vector2.h
index 81bc71d590..edc6e3a3ef 100644
--- a/core/math/vector2.h
+++ b/core/math/vector2.h
@@ -280,6 +280,14 @@ struct Vector2i {
return p_idx ? y : x;
}
+ Vector2i min(const Vector2i &p_vector2i) const {
+ return Vector2(MIN(x, p_vector2i.x), MIN(y, p_vector2i.y));
+ }
+
+ Vector2i max(const Vector2i &p_vector2i) const {
+ return Vector2(MAX(x, p_vector2i.x), MAX(y, p_vector2i.y));
+ }
+
Vector2i operator+(const Vector2i &p_v) const;
void operator+=(const Vector2i &p_v);
Vector2i operator-(const Vector2i &p_v) const;