2 public struct Rectangle : IEquatable<Rectangle> {
33 public Rectangle(
int left,
int top,
int width,
int height) {
48 public override string ToString() => $
"{Left},{Top},{Width},{Height}";
57 return num3 > num && num4 > num2;
65 return num3 <= num || num4 <= num2 ?
Empty :
new Rectangle(num, num2, num3 - num, num4 - num2);
73 return new Rectangle(num, num2, num3 - num, num4 - num2);
static int Min(int x1, int x2)
static int Max(int x1, int x2)
static bool operator!=(Rectangle r1, Rectangle r2)
bool Intersection(Rectangle r)
bool Equals(Rectangle other)
override bool Equals(object obj)
static Rectangle Intersection(Rectangle r1, Rectangle r2)
static Rectangle Union(Rectangle r1, Rectangle r2)
static bool operator==(Rectangle r1, Rectangle r2)
override string ToString()
Rectangle(int left, int top, int width, int height)
override int GetHashCode()