Equals() public method

public Equals ( Object obj ) : bool
obj Object
return bool
Beispiel #1
0
        public override bool Equals(Object obj)
        {
            if (this == obj)
            {
                return(true);
            }
            if (obj == null)
            {
                return(false);
            }
            if (GetType() != obj.GetType())
            {
                return(false);
            }
            Mat22 other = (Mat22)obj;

            if (Ex == null)
            {
                if (other.Ex != null)
                {
                    return(false);
                }
            }
            else if (!Ex.Equals(other.Ex))
            {
                return(false);
            }
            if (Ey == null)
            {
                if (other.Ey != null)
                {
                    return(false);
                }
            }
            else if (!Ey.Equals(other.Ey))
            {
                return(false);
            }
            return(true);
        }