mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 20:05:58 +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() {
|
||||
float newW = x + w - std::floor(x);
|
||||
float newH = y + h - std::floor(y);
|
||||
x = std::floor(x);
|
||||
y = std::floor(y);
|
||||
w = std::floor(newW);
|
||||
h = std::floor(newH);
|
||||
float newW = x + w - std::round(x);
|
||||
float newH = y + h - std::round(y);
|
||||
x = std::round(x);
|
||||
y = std::round(y);
|
||||
w = std::round(newW);
|
||||
h = std::round(newH);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue