Example #1
0
        public static bool HasIntersection(LineSegment2 <double> segmentP, LineSegment2 <double> segmentQ)
        {
            if (segmentP == null || segmentQ == null)
            {
                return(false);
            }
            LineSegment2IntersectionResult <double> tmp = ComputeIntersection(segmentP.Start, segmentP.End, segmentQ.Start, segmentQ.End);

            return(tmp.IntersectionType != LineIntersectionType.NoIntersection);
        }
Example #2
0
        public static bool HasIntersection(Point2 <double> p1, Point2 <double> p2, Point2 <double> q1, Point2 <double> q2)
        {
            LineSegment2IntersectionResult <double> tmp = ComputeIntersection(p1, p2, q1, q2);

            return(tmp.IntersectionType != LineIntersectionType.NoIntersection);
        }