AgaHackTools.Example.Shared.Math.Vector2.GetHashCode C# (CSharp) Method

GetHashCode() public method

public GetHashCode ( ) : int
return int
        public override int GetHashCode()
        {
            return this.X.GetHashCode() ^ this.Y.GetHashCode();
        }

Usage Example

Example #1
0
        public override bool Equals(object obj)
        {
            Vector2 vec = (Vector2)obj;

            return(this.GetHashCode() == vec.GetHashCode());
        }