aboutsummaryrefslogtreecommitdiff
path: root/src/common/math_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/math_util.h')
-rw-r--r--src/common/math_util.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/common/math_util.h b/src/common/math_util.h
index 1f5928c15f..f52a0a35ae 100644
--- a/src/common/math_util.h
+++ b/src/common/math_util.h
@@ -85,10 +85,10 @@ struct Rectangle {
}
[[nodiscard]] constexpr bool Intersect(const Rectangle<T>& with, Rectangle<T>* result) const {
- result->left = std::max(left, with.left);
- result->top = std::max(top, with.top);
- result->right = std::min(right, with.right);
- result->bottom = std::min(bottom, with.bottom);
+ result->left = (std::max)(left, with.left);
+ result->top = (std::max)(top, with.top);
+ result->right = (std::min)(right, with.right);
+ result->bottom = (std::min)(bottom, with.bottom);
return !result->IsEmpty();
}
};