Пример #1
0
        public static void within_point()
        {
            var a = new Mbr(1, 2, 3, 4);
            var b = new Mbr(2, 3, 2, 3);
            var c = new Mbr(3, 3, 3, 3);
            var p = new Point2(2, 3);

            Assert.False(a.Within(p));
            Assert.True(b.Within(p));
            Assert.False(c.Within(p));
        }
Пример #2
0
        public static void within_mbr()
        {
            var a = new Mbr(1, 2, 3, 4);
            var b = new Mbr(2, 3, 4, 5);
            var c = new Mbr(1.5, 2.5, 2.5, 3.5);
            var d = new Mbr(1.5, 2, 2.5, 4);

            Assert.True(a.Within(a));
            Assert.False(a.Within(b));
            Assert.False(a.Within(c));
            Assert.False(a.Within(d));
            Assert.False(b.Within(a));
            Assert.True(b.Within(b));
            Assert.False(b.Within(c));
            Assert.False(b.Within(d));
            Assert.True(c.Within(a));
            Assert.False(c.Within(b));
            Assert.True(c.Within(c));
            Assert.True(c.Within(d));
            Assert.True(d.Within(a));
            Assert.False(d.Within(b));
            Assert.False(d.Within(c));
            Assert.True(d.Within(d));
        }
Пример #3
0
        public static void within_point() {
            var a = new Mbr(1, 2, 3, 4);
            var b = new Mbr(2, 3, 2, 3);
            var c = new Mbr(3, 3, 3, 3);
            var p = new Point2(2, 3);

            Assert.False(a.Within(p));
            Assert.True(b.Within(p));
            Assert.False(c.Within(p));
        }
Пример #4
0
        public static void within_mbr() {
            var a = new Mbr(1, 2, 3, 4);
            var b = new Mbr(2, 3, 4, 5);
            var c = new Mbr(1.5, 2.5, 2.5, 3.5);
            var d = new Mbr(1.5, 2, 2.5, 4);

            Assert.True(a.Within(a));
            Assert.False(a.Within(b));
            Assert.False(a.Within(c));
            Assert.False(a.Within(d));
            Assert.False(b.Within(a));
            Assert.True(b.Within(b));
            Assert.False(b.Within(c));
            Assert.False(b.Within(d));
            Assert.True(c.Within(a));
            Assert.False(c.Within(b));
            Assert.True(c.Within(c));
            Assert.True(c.Within(d));
            Assert.True(d.Within(a));
            Assert.False(d.Within(b));
            Assert.False(d.Within(c));
            Assert.True(d.Within(d));
        }