mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-17 13:03:48 -07:00
box: use std::round instead of std::floor in ::round()
fixes #3761, possibly also #3511
This commit is contained in:
@@ -58,12 +58,12 @@ CBox& CBox::applyFromWlr() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
CBox& CBox::round() {
|
CBox& CBox::round() {
|
||||||
float newW = x + w - std::floor(x);
|
float newW = x + w - std::round(x);
|
||||||
float newH = y + h - std::floor(y);
|
float newH = y + h - std::round(y);
|
||||||
x = std::floor(x);
|
x = std::round(x);
|
||||||
y = std::floor(y);
|
y = std::round(y);
|
||||||
w = std::floor(newW);
|
w = std::round(newW);
|
||||||
h = std::floor(newH);
|
h = std::round(newH);
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user