Пример #1
0
        public void IntersectTest()
        {
            Vector2 a = (1, 1);
            Vector2 b = (2, 3);
            Vector2 c = (0, 2);
            Vector2 d = (2, 1);
            Vector2 e = (0, -2);

            Line2 l1 = (a, b);
            Line2 l2 = (c, d);
            Line2 l3 = (e, d);

            Assert.AreEqual(true, l1.IsSectionIntersectedBy(l2));
            Assert.AreEqual(false, l1.IsSectionIntersectedBy(l3));
        }