mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-09 15:26:00 +01:00
box: use std::round instead of std::floor in ::round()
fixes #3761, possibly also #3511
This commit is contained in:
parent
9404972732
commit
c4e1a9b13b
1 changed files with 6 additions and 6 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue