math/region: fix scale using x scale as y scale (#39)

This commit is contained in:
outfoxxed 2025-01-22 00:35:48 -08:00 committed by GitHub
parent 72dfbf5296
commit 59414c4cee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -149,9 +149,9 @@ CRegion& Hyprutils::Math::CRegion::scale(const Vector2D& scale) {
for (auto& r : rects) {
r.x1 = std::floor(r.x1 * scale.x);
r.y1 = std::floor(r.y1 * scale.x);
r.y1 = std::floor(r.y1 * scale.y);
r.x2 = std::ceil(r.x2 * scale.x);
r.y2 = std::ceil(r.y2 * scale.x);
r.y2 = std::ceil(r.y2 * scale.y);
add(&r);
}
@ -214,4 +214,4 @@ Vector2D Hyprutils::Math::CRegion::closestPoint(const Vector2D& vec) const {
}
return leader;
}
}