diff --git a/impeller/geometry/size.h b/impeller/geometry/size.h index f56e682cdc7b6..2415d314a5560 100644 --- a/impeller/geometry/size.h +++ b/impeller/geometry/size.h @@ -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), }; }