diff options
author | Gilles Roudière <gilles.roudiere@gmail.com> | 2021-05-07 15:41:39 +0200 |
---|---|---|
committer | Gilles Roudière <gilles.roudiere@gmail.com> | 2021-05-07 18:06:17 +0200 |
commit | a3dda2df85bf3e3ef82dbe1c2377640b9f3fd9c0 (patch) | |
tree | cedf0a8411cfc773f63acb1bc702c4cf20008ac5 /core/math/vector2.h | |
parent | d81ea631d91bd282b823ab03d68123befe4027c0 (diff) | |
download | redot-engine-a3dda2df85bf3e3ef82dbe1c2377640b9f3fd9c0.tar.gz |
Rework the TileSet resource and TileMap nodes:
- Move most properties from TileMap to TileSet,
- Make TileSet more flexible, supporting more feature (several
collision layers, etc...),
- Fusion both the TileMap and TileSet editor,
- Implement TileSetSources, and thus a new way to index tiles in the TileSet,
- Rework the TileSet and TileMap editors completely,
- Implement an editor zoom widget (and use it in several places)
Diffstat (limited to 'core/math/vector2.h')
-rw-r--r-- | core/math/vector2.h | 8 |
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; |