diff options
author | Vaxry <[email protected]> | 2023-11-05 14:47:24 +0000 |
---|---|---|
committer | Vaxry <[email protected]> | 2023-11-05 14:47:24 +0000 |
commit | c4e1a9b13baf9a0f8b58824803c4a9e63cbc41b3 (patch) | |
tree | a8e69bed86ae8e0f34df84d23ae68469b4688430 | |
parent | 94049727327de8bf087184b0e2b386a5bc2563ba (diff) | |
download | Hyprland-c4e1a9b13baf9a0f8b58824803c4a9e63cbc41b3.tar.gz Hyprland-c4e1a9b13baf9a0f8b58824803c4a9e63cbc41b3.zip |
box: use std::round instead of std::floor in ::round()
fixes #3761, possibly also #3511
-rw-r--r-- | src/helpers/Box.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/helpers/Box.cpp b/src/helpers/Box.cpp index e71ed622..55300f5f 100644 --- a/src/helpers/Box.cpp +++ b/src/helpers/Box.cpp @@ -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; } |