public static SegmentParametric GetParametricProjection( LineParametric line, List<Vector2> vertices) { PointParametric max = new PointParametric(line, -999999); PointParametric min = new PointParametric(line, 999999); PointParametric tempPoint; foreach (Vector2 vertex in vertices) { tempPoint = line.GetProjectionPoint(vertex); if (tempPoint.T > max.T) { max = tempPoint; } else if (tempPoint.T < min.T) { min = tempPoint; } } return new SegmentParametric(line, min.T, max.T); }