Skip to content

Commit

Permalink
Remove unused and confusing API in TRect.
Browse files Browse the repository at this point in the history
  • Loading branch information
chinmaygarde authored and dnfield committed Apr 27, 2022
1 parent 4417fa6 commit a63c047
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions impeller/geometry/size.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,17 @@ 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 {
constexpr TSize Min(const TSize& o) const {
return {
std::max(width, o.width),
std::max(height, o.height),
std::min(width, o.width),
std::min(height, o.height),
};
}

constexpr TSize Intersection(const TSize& o) const {
constexpr TSize Max(const TSize& o) const {
return {
std::min(width, o.width),
std::min(height, o.height),
std::max(width, o.width),
std::max(height, o.height),
};
}

Expand Down

0 comments on commit a63c047

Please sign in to comment.