From bb0dd03e0f70a7097432d41fe123cfe959478e2f Mon Sep 17 00:00:00 2001 From: C9Glax <13404778+C9Glax@users.noreply.github.com> Date: Tue, 7 Feb 2023 23:53:25 +0100 Subject: [PATCH] Override GetHashCode() --- OSMDatastructure/Coordinates.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OSMDatastructure/Coordinates.cs b/OSMDatastructure/Coordinates.cs index cbcfcbc..61fe064 100644 --- a/OSMDatastructure/Coordinates.cs +++ b/OSMDatastructure/Coordinates.cs @@ -31,6 +31,11 @@ public class Coordinates return latHash * offset + lonHash; } + public override int GetHashCode() + { + return HashCode.Combine(latitude, longitude); + } + public ulong GetRegionHash() { float latRegion = this.latitude - this.latitude % Region.regionSize;