public void Intersects_LineLine_ReturnsaTrueForIntersectingLines()
        {
            ICoordinateList line1 = new CoordinateList(new Coordinate[] { new Coordinate(1.0, 1.0), new Coordinate(2.0, 1.0), new Coordinate(2.0, 2.0) });
            ICoordinateList line2 = new CoordinateList(new Coordinate[] { new Coordinate(1.0, 0.0), new Coordinate(1.5, 2.0), new Coordinate(2.0, -1.0) });

            Euclidean2DLocator target = new Euclidean2DLocator();

            Assert.True(target.Intersects(line1, line2));
        }
        public void Intersects_ReturnsFalseForLineAndLineSegmentThatIntersectsOutsideLineSegment2()
        {
            Coordinate A1 = new Coordinate(1.0, 1.0);
            Coordinate B1 = new Coordinate(2.0, 1.0);

            Coordinate A2 = new Coordinate(2.0, 0.0);
            Coordinate B2 = new Coordinate(3.0, 0.5);

            Euclidean2DLocator target = new Euclidean2DLocator();

            Assert.False(target.Intersects(A1, B1, LineMode.Line, A2, B2, LineMode.LineSegment));
        }
        public void Intersects_ReturnsTrueForIntersectingLineSegments()
        {
            Coordinate A1 = new Coordinate(1.0, 1.0);
            Coordinate B1 = new Coordinate(3.0, 1.0);

            Coordinate A2 = new Coordinate(1.0, 0.0);
            Coordinate B2 = new Coordinate(3.0, 2.0);

            Euclidean2DLocator target = new Euclidean2DLocator();

            Assert.True(target.Intersects(A1, B1, LineMode.LineSegment, A2, B2, LineMode.LineSegment));
        }
        public void Intersects_ReturnsFalseForParallelLines()
        {
            Coordinate A1 = new Coordinate(1.0, 1.0);
            Coordinate B1 = new Coordinate(2.0, 2.0);

            Coordinate A2 = new Coordinate(2.0, 1.0);
            Coordinate B2 = new Coordinate(3.0, 2.0);

            Euclidean2DLocator target = new Euclidean2DLocator();

            Assert.False(target.Intersects(A1, B1, LineMode.Line, A2, B2, LineMode.Line));
        }