Override GetHashCode()
This commit is contained in:
parent
79babc036f
commit
bb0dd03e0f
@ -31,6 +31,11 @@ public class Coordinates
|
|||||||
return latHash * offset + lonHash;
|
return latHash * offset + lonHash;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override int GetHashCode()
|
||||||
|
{
|
||||||
|
return HashCode.Combine(latitude, longitude);
|
||||||
|
}
|
||||||
|
|
||||||
public ulong GetRegionHash()
|
public ulong GetRegionHash()
|
||||||
{
|
{
|
||||||
float latRegion = this.latitude - this.latitude % Region.regionSize;
|
float latRegion = this.latitude - this.latitude % Region.regionSize;
|
||||||
|
Reference in New Issue
Block a user