Remove unused and confusing API in TRect.

This commit is contained in:
Chinmay Garde
2021-12-04 14:17:20 -08:00
committed by Dan Field
parent 5678b910a0
commit 72e4d8c955

View File

@@ -59,24 +59,20 @@ struct TSize {
return {width - s.width, height - s.height};
}
constexpr TSize Min(const TSize& s) const { return Intersection(s); }
constexpr TSize Max(const TSize& s) const { return Union(s); }
constexpr TSize Union(const TSize& o) const {
return {
std::max(width, o.width),
std::max(height, o.height),
};
}
constexpr TSize Intersection(const TSize& o) const {
constexpr TSize Min(const TSize& o) const {
return {
std::min(width, o.width),
std::min(height, o.height),
};
}
constexpr TSize Max(const TSize& o) const {
return {
std::max(width, o.width),
std::max(height, o.height),
};
}
constexpr Type Area() const { return width * height; }
constexpr bool IsPositive() const { return width > 0 && height > 0; }