diff --git a/engine/src/flutter/impeller/geometry/size.h b/engine/src/flutter/impeller/geometry/size.h index f56e682cdc..2415d314a5 100644 --- a/engine/src/flutter/impeller/geometry/size.h +++ b/engine/src/flutter/impeller/geometry/size.h @@ -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; }