diff --git a/TMI-practicum/Program.cs b/TMI-practicum/Program.cs index 72ce782..aea1ce6 100644 --- a/TMI-practicum/Program.cs +++ b/TMI-practicum/Program.cs @@ -79,17 +79,7 @@ namespace TMI_practicum solved.Contains(new Intersection(intersection.X, intersection.Y - 1e-15)) ) continue; - bool found = false; - - foreach (var ints in solved) - { - if (Math.Abs(ints.X - intersection.X) < 1e-12 && - Math.Abs(ints.Y - intersection.Y) < 1e-12) - { - found = true; - break; - } - } + bool found = solved.Any(ints => Math.Abs(ints.X - intersection.X) < 1e-12 && Math.Abs(ints.Y - intersection.Y) < 1e-12); if (found) continue;