From 13886a264f7e076681f9c2c65367c643a973f390 Mon Sep 17 00:00:00 2001 From: vaxerski Date: Mon, 14 Aug 2023 14:22:06 +0200 Subject: internal: add a new monitor auto system --- src/helpers/Vector2D.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/helpers/Vector2D.hpp') 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; -- cgit v1.2.3