summaryrefslogtreecommitdiff
path: root/src/helpers/Vector2D.cpp
diff options
context:
space:
mode:
authorMightyPlaza <123664421+MightyPlaza@users.noreply.github.com>2024-02-04 15:40:20 +0000
committerGitHub <noreply@github.com>2024-02-04 15:40:20 +0000
commitcbadf3e3f31ab5ad5d192daac5f2ca930d08b8fb (patch)
tree40fe310e5ffb955a19b32a2c8d234b3bdf9e45cb /src/helpers/Vector2D.cpp
parent1ed4f1cb254ce4b4e55727d972998be1ef4baf22 (diff)
input: focus window on mouse down on decoration (#4514)
Also unifies vectorToWindow funcs
Diffstat (limited to 'src/helpers/Vector2D.cpp')
-rw-r--r--src/helpers/Vector2D.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/helpers/Vector2D.cpp b/src/helpers/Vector2D.cpp
index fb432936..4cd3476b 100644
--- a/src/helpers/Vector2D.cpp
+++ b/src/helpers/Vector2D.cpp
@@ -45,3 +45,7 @@ double Vector2D::distance(const Vector2D& other) const {
double Vector2D::size() const {
return std::sqrt(x * x + y * y);
}
+
+Vector2D Vector2D::getComponentMax(const Vector2D& other) const {
+ return Vector2D(std::max(this->x, other.x), std::max(this->y, other.y));
+}