Better hashcodes for Vectors and Vertices

This commit is contained in:
Latif Khalifa
2014-06-27 11:15:54 +02:00
parent 49ad7e627a
commit 1efb357275
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>