mirror of
https://github.com/hyprwm/hyprutils.git
synced 2025-01-27 04:49:49 +01:00
math/region: fix scale using x scale as y scale (#39)
This commit is contained in:
parent
72dfbf5296
commit
59414c4cee
1 changed files with 3 additions and 3 deletions
|
@ -149,9 +149,9 @@ CRegion& Hyprutils::Math::CRegion::scale(const Vector2D& scale) {
|
||||||
|
|
||||||
for (auto& r : rects) {
|
for (auto& r : rects) {
|
||||||
r.x1 = std::floor(r.x1 * scale.x);
|
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.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);
|
add(&r);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -214,4 +214,4 @@ Vector2D Hyprutils::Math::CRegion::closestPoint(const Vector2D& vec) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
return leader;
|
return leader;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue