From cbadf3e3f31ab5ad5d192daac5f2ca930d08b8fb Mon Sep 17 00:00:00 2001 From: MightyPlaza <123664421+MightyPlaza@users.noreply.github.com> Date: Sun, 4 Feb 2024 15:40:20 +0000 Subject: input: focus window on mouse down on decoration (#4514) Also unifies vectorToWindow funcs --- src/helpers/Vector2D.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/helpers/Vector2D.cpp') 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)); +} -- cgit v1.2.3