internal static void clamp_to_fold(c_coordinate point, c_fold fold) { if (fold.orientation == e_orientation.horizontal) { point.Y = Math.Min(point.Y, fold.position); } else { point.X = Math.Min(point.X, fold.position); } }
internal static void fold_points(List <c_coordinate> points, c_fold fold) { for (int i = 0; i < points.Count; i++) { if (fold.orientation == e_orientation.horizontal) { if (points[i].Y > fold.position) { points[i].Y = fold.position - (points[i].Y - fold.position); } } else { if (points[i].X > fold.position) { points[i].X = fold.position - (points[i].X - fold.position); } } } }