Example #1
0
        public void TestCreateMerged()
        {
            BoundingRectangle rectangle1 = new BoundingRectangle(
                new Vector2(10.0f, 20.0f), new Vector2(30.0f, 40.0f)
                );
            BoundingRectangle rectangle2 = new BoundingRectangle(
                new Vector2(50.0f, 60.0f), new Vector2(70.0f, 80.0f)
                );

            BoundingRectangle merged = BoundingRectangle.CreateMerged(
                rectangle1, rectangle2
                );

            Assert.AreEqual(new Vector2(10.0f, 20.0f), merged.Min);
            Assert.AreEqual(new Vector2(70.0f, 80.0f), merged.Max);
        }