update
This commit is contained in:
@@ -6,7 +6,7 @@ namespace TMI_practicum
|
||||
{
|
||||
public static IEnumerable<Intersection> Solve(IList<Circle> circles)
|
||||
{
|
||||
var intersections = new List<Intersection>();
|
||||
var intersections = new HashSet<Intersection>();
|
||||
|
||||
for (int i = 0; i < circles.Count - 1; i++)
|
||||
{
|
||||
@@ -15,7 +15,11 @@ namespace TMI_practicum
|
||||
var c1 = circles[i];
|
||||
var c2 = circles[j];
|
||||
var intersects = c1.FindIntersections(c2);
|
||||
if (intersects != null) intersections.AddRange(c1.FindIntersections(c2));
|
||||
if (intersects == null) continue;
|
||||
foreach (var intersect in intersects)
|
||||
{
|
||||
intersections.Add(intersect);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user