box: fix noNegativeSize

This commit is contained in:
Vaxry 2024-05-10 12:58:53 +01:00
parent 37a84c5223
commit 38911d6df4

View file

@ -115,8 +115,8 @@ CBox& CBox::expand(const double& value) {
}
CBox& CBox::noNegativeSize() {
std::clamp(w, 0.0, std::numeric_limits<double>::infinity());
std::clamp(h, 0.0, std::numeric_limits<double>::infinity());
w = std::clamp(w, 0.0, std::numeric_limits<double>::infinity());
h = std::clamp(h, 0.0, std::numeric_limits<double>::infinity());
return *this;
}