Ejemplo n.º 1
0
        public void RectanglesOverlapSizeZeroInvariant()
        {
            var r = new Random(223123);

            for (var i = 0; i < 500; i++)
            {
                var topLeft  = RandomInt2(r, new Int2(-10, -10), new Int2(10, 10));
                var size     = RandomInt2(r, new Int2(0, 0), new Int2(10, 10));
                var point    = RandomInt2(r, new Int2(-10, -10), new Int2(10, 10));
                var result   = World.RectanglesOverlap(topLeft, size, point, new Int2());
                var expected = World.PointInRectangle(topLeft, size, point);
                Assert.AreEqual(expected, result);
            }
        }