Box2D.Common.Vec2.GetHashCode C# (CSharp) Method

GetHashCode() public method

public GetHashCode ( ) : int
return int
        public override int GetHashCode()
        {
            // automatically generated by Eclipse
            const int prime = 31;
            int result = 1;
            result = prime * result + FloatToIntBits(X);
            result = prime * result + FloatToIntBits(Y);
            return result;
        }

Usage Example

Beispiel #1
0
        public override int GetHashCode()
        {
            const int prime  = 31;
            int       result = 1;

            result = prime * result + ((Ex == null) ? 0 : Ex.GetHashCode());
            result = prime * result + ((Ey == null) ? 0 : Ey.GetHashCode());
            return(result);
        }