public static double Distance(Segment segment, Polygon polygon) { return(polygon.Sides.Min(s => SegmentWithSegment.Distance(s, segment))); }
public static List <RealPoint> GetCrossingPoints(Segment segment, Polygon polygon) { return(polygon.Sides.SelectMany(s => SegmentWithSegment.GetCrossingPoints(s, segment)).ToList()); }
public static bool Cross(Segment segment, Polygon polygon) { return(polygon.Sides.Exists(s => SegmentWithSegment.Cross(s, segment))); }