Added a Downloader for AoC puzzle inputs

This commit is contained in:
2025-12-14 16:06:38 +01:00
parent e68be83627
commit 0b0f4eabb4
5 changed files with 53 additions and 3 deletions
+2 -2
View File
@@ -3,7 +3,7 @@
public record Coordinate(long X, long Y)
{
public double GetEuclidianDistance(Coordinate other) =>
Math.Sqrt((X - other.X) * (X - other.X) + (Y - other.Y) * (Y - other.Y));
GetEuclidianDistance(this, other);
public static double GetEuclidianDistance(Coordinate a, Coordinate b) =>
Math.Sqrt((a.X - b.X) * (a.X - b.X) + (a.Y - b.Y) * (a.Y - b.Y));
@@ -15,7 +15,7 @@ public record Coordinate(long X, long Y)
public record Coordinate3d(long X, long Y, long Z)
{
public double GetEuclidianDistance(Coordinate3d other) =>
Math.Sqrt((X - other.X) * (X - other.X) + (Y - other.Y) * (Y - other.Y) + (Z - other.Z) * (Z - other.Z));
GetEuclidianDistance(this, other);
public static double GetEuclidianDistance(Coordinate3d a, Coordinate3d b) =>
Math.Sqrt((a.X - b.X) * (a.X - b.X) + (a.Y - b.Y) * (a.Y - b.Y) + (a.Z - b.Z) * (a.Z - b.Z));