namespace TMI_practicum { public struct Intersection { public readonly double X; public readonly double Y; public Intersection(double x, double y) { X = x; Y = y; } public override int GetHashCode() { return X.GetHashCode() ^ Y.GetHashCode(); } public override bool Equals(object obj) { return obj is Intersection intersection && this == intersection; } public static bool operator ==(Intersection x, Intersection y) { return x.X == y.X && x.Y == y.Y; } public static bool operator !=(Intersection x, Intersection y) { return !(x == y); } } }