From 01f85a09a981eb6c8784d459f729d418c0dd19e3 Mon Sep 17 00:00:00 2001 From: vaxerski Date: Fri, 23 Jun 2023 21:14:04 +0200 Subject: xwayland: send zero scaling to xwayland if enabled --- src/helpers/Vector2D.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/helpers/Vector2D.cpp') diff --git a/src/helpers/Vector2D.cpp b/src/helpers/Vector2D.cpp index 2d52eb9e..21701c97 100644 --- a/src/helpers/Vector2D.cpp +++ b/src/helpers/Vector2D.cpp @@ -24,15 +24,15 @@ double Vector2D::normalize() { return max; } -Vector2D Vector2D::floor() { +Vector2D Vector2D::floor() const { return Vector2D(std::floor(x), std::floor(y)); } -Vector2D Vector2D::clamp(const Vector2D& min, const Vector2D& max) { +Vector2D Vector2D::clamp(const Vector2D& min, const Vector2D& max) const { return Vector2D(std::clamp(this->x, min.x, max.x < min.x ? INFINITY : max.x), std::clamp(this->y, min.y, max.y < min.y ? INFINITY : max.y)); } -double Vector2D::distance(const Vector2D& other) { +double Vector2D::distance(const Vector2D& other) const { double dx = x - other.x; double dy = y - other.y; return std::sqrt(dx * dx + dy * dy); -- cgit v1.2.3