public static bool HasIntersection(CoordinatePair2 <double> segmentP, CoordinatePair2 <double> segmentQ) { if (segmentP == null || segmentQ == null) { return(false); } LineIntersectionResult <double> tmp = ComputeIntersection(segmentP.Start, segmentP.End, segmentQ.Start, segmentQ.End); return(tmp.IntersectionType != LineIntersectionType.NoIntersection); }
public static bool HasIntersection(Coordinate2 <double> p1, Coordinate2 <double> p2, Coordinate2 <double> q1, Coordinate2 <double> q2) { LineIntersectionResult <double> tmp = ComputeIntersection(p1, p2, q1, q2); return(tmp.IntersectionType != LineIntersectionType.NoIntersection); }