public void Intersect() { var rect1 = new Rect2d(0, 0, 100, 100); var rect2 = new Rect2d(0, 0, 100, 100); var intersect = rect1.Intersect(rect2); Assert.Equal(new Rect2d(0, 0, 100, 100), intersect); rect2 = new Rect2d(50, 0, 100, 100); intersect = rect1.Intersect(rect2); Assert.Equal(new Rect2d(50, 0, 50, 100), intersect); rect2 = new Rect2d(100, 0, 100, 100); intersect = rect1.Intersect(rect2); Assert.Equal(new Rect2d(100, 0, 0, 100), intersect); }