min method

Size min(
  1. Size other
)

Returns the size that is the component-wise minimum of this size and the given other size.

Implementation

Size min(Size other) {
  return Size(
    math.min(width, other.width),
    math.min(height, other.height),
  );
}