summaryrefslogtreecommitdiff
path: root/src/helpers/Vector2D.hpp
diff options
context:
space:
mode:
authorvaxerski <vaxry@vaxry.net>2023-08-14 14:22:06 +0200
committervaxerski <vaxry@vaxry.net>2023-08-14 14:22:10 +0200
commit13886a264f7e076681f9c2c65367c643a973f390 (patch)
treece8d58854307298c7312341f90ca926e94e87db3 /src/helpers/Vector2D.hpp
parenta0cf89029263decba29b0f4216b38576f4418335 (diff)
internal: add a new monitor auto system
Diffstat (limited to 'src/helpers/Vector2D.hpp')
-rw-r--r--src/helpers/Vector2D.hpp8
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;