diff options
| author | vaxerski <vaxry@vaxry.net> | 2023-08-14 14:22:06 +0200 |
|---|---|---|
| committer | vaxerski <vaxry@vaxry.net> | 2023-08-14 14:22:10 +0200 |
| commit | 13886a264f7e076681f9c2c65367c643a973f390 (patch) | |
| tree | ce8d58854307298c7312341f90ca926e94e87db3 /src/helpers/Vector2D.hpp | |
| parent | a0cf89029263decba29b0f4216b38576f4418335 (diff) | |
internal: add a new monitor auto system
Diffstat (limited to 'src/helpers/Vector2D.hpp')
| -rw-r--r-- | src/helpers/Vector2D.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/helpers/Vector2D.hpp b/src/helpers/Vector2D.hpp index d23b3fbe..a5fcc72a 100644 --- a/src/helpers/Vector2D.hpp +++ b/src/helpers/Vector2D.hpp @@ -43,6 +43,14 @@ class Vector2D { return Vector2D(this->x / a.x, this->y / a.y); } + bool operator>(const Vector2D& a) const { + return this->x > a.x && this->y > a.y; + } + + bool operator<(const Vector2D& a) const { + return this->x < a.x && this->y < a.y; + } + double distance(const Vector2D& other) const; Vector2D clamp(const Vector2D& min, const Vector2D& max = Vector2D()) const; |
