Skip to content

Commit a63c047

Browse files
chinmaygardednfield
authored andcommitted
Remove unused and confusing API in TRect.
1 parent 4417fa6 commit a63c047

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

impeller/geometry/size.h

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,21 +59,17 @@ struct TSize {
5959
return {width - s.width, height - s.height};
6060
}
6161

62-
constexpr TSize Min(const TSize& s) const { return Intersection(s); }
63-
64-
constexpr TSize Max(const TSize& s) const { return Union(s); }
65-
66-
constexpr TSize Union(const TSize& o) const {
62+
constexpr TSize Min(const TSize& o) const {
6763
return {
68-
std::max(width, o.width),
69-
std::max(height, o.height),
64+
std::min(width, o.width),
65+
std::min(height, o.height),
7066
};
7167
}
7268

73-
constexpr TSize Intersection(const TSize& o) const {
69+
constexpr TSize Max(const TSize& o) const {
7470
return {
75-
std::min(width, o.width),
76-
std::min(height, o.height),
71+
std::max(width, o.width),
72+
std::max(height, o.height),
7773
};
7874
}
7975

0 commit comments

Comments
 (0)