Пример #1
0
        public void IntersectTest()
        {
            var a1 = new Point(0, 0);
            var a2 = new Point(1, 0);
            var b1 = new Point(1, 1);
            var b2 = new Point(2, 1);

            Assert.IsFalse(LineSegment.AreLineSegmentsIntersecting(a1, a2, b1, b2));
            b2 = new Point(0, 0);
            Assert.IsTrue(LineSegment.AreLineSegmentsIntersecting(a1, a2, b1, b2));
            b2 = new Point(-1, 0);
            Assert.IsFalse(LineSegment.AreLineSegmentsIntersecting(a1, a2, b1, b2));
        }