Better hashcodes for Vectors and Vertices

This commit is contained in:
Latif Khalifa
2014-06-27 11:15:54 +02:00
committed by Justin Clark-Casey
parent 606834e9cf
commit 7e4bdad41a
3 changed files with 38 additions and 3 deletions

View File

@@ -355,7 +355,9 @@ namespace OpenMetaverse
public override int GetHashCode()
{
return X.GetHashCode() ^ Y.GetHashCode();
int hash = X.GetHashCode();
hash = hash * 31 + Y.GetHashCode();
return hash;
}
/// <summary>