System.Drawing.PrimitivesTest.RectangleFTests.IntersectTest C# (CSharp) Method

IntersectTest() private method

private IntersectTest ( float x, float y, float width, float height ) : void
x float
y float
width float
height float
return void
        public void IntersectTest(float x, float y, float width, float height)
        {
            RectangleF rect1 = new RectangleF(x, y, width, height);
            RectangleF rect2 = new RectangleF(y, x, width, height);
            RectangleF expectedRect = RectangleF.Intersect(rect1, rect2);
            rect1.Intersect(rect2);
            Assert.Equal(expectedRect, rect1);
            Assert.False(rect1.IntersectsWith(expectedRect));
        }