Delaunay: drop the fewer-than-two guard the collinear branch already covers

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Nibu 2026-11-13 15:39:23 +00:00 • committed by soul
commit fc97c8be25

View file

@ -27,7 +27,6 @@ public static class Delaunay
for (var i = 1; i < n; i++)
if (points[order[i - 1]].x == points[order[i]].x && points[order[i - 1]].y == points[order[i]].y)
throw new ArgumentException($"Delaunay points {Math.Min(order[i - 1], order[i])} and {Math.Max(order[i - 1], order[i])} are the same point ({points[order[i]].x}, {points[order[i]].y})");
if (n < 2) return new List<(int a, int b)>();
var x = new double[n + 3];
var y = new double[n + 3];