public static PointF FindIntersection(AESegment segArea, AESegment track) { PointF intersection; if (track.isCurved) { if ((int)(track.startPoint.X) == 45892) { intersection = PointF.Empty; } intersection = DrawUtility.FindCurveIntersection(segArea, track); } else { intersection = DrawUtility.FindStraightIntersection(segArea, track); } return(intersection); }
public bool PointOnSegment(PointF toCheck) { PointF closest; double dist; if (!isCurved) { dist = DrawUtility.FindDistanceToSegment(toCheck, this, out closest); } else { dist = DrawUtility.FindDistanceToCurve(toCheck, this, out closest); } if (Math.Round(dist, 2) != 0.0) { return(false); } return(true); }