Ejemplo n.º 1
0
        public void Union()
        {
            Assert.AreEqual(rectD, rectD.Union(rectD));
            Assert.AreEqual(rectD, rectD.Union(new RectD(2, 3, 2, 3)));
            Assert.AreEqual(new RectD(0, 1, 5, 6), rectD.Union(new RectD(0, 1, 4, 5)));
            Assert.AreEqual(new RectD(1, 2, 13, 6), rectD.Union(new RectD(10, 3, 4, 5)));

            Assert.AreEqual(rectF, rectF.Union(rectF));
            Assert.AreEqual(rectF, rectF.Union(new RectF(2, 3, 2, 3)));
            Assert.AreEqual(new RectF(0, 1, 5, 6), rectF.Union(new RectF(0, 1, 4, 5)));
            Assert.AreEqual(new RectF(1, 2, 13, 6), rectF.Union(new RectF(10, 3, 4, 5)));

            Assert.AreEqual(rectI, rectI.Union(rectI));
            Assert.AreEqual(rectI, rectI.Union(new RectI(2, 3, 2, 3)));
            Assert.AreEqual(new RectI(0, 1, 5, 6), rectI.Union(new RectI(0, 1, 4, 5)));
            Assert.AreEqual(new RectI(1, 2, 13, 6), rectI.Union(new RectI(10, 3, 4, 5)));
        }