Added a Downloader for AoC puzzle inputs
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user