예제 #1
0
        /**
         * Compares for reference equality and value equality.
         */
        public bool equals(Vector3Double rhs)
        {
            bool ivarsEqual = true;

            if (rhs.GetType() != this.GetType())
            {
                return(false);
            }


            if (!(_x == rhs._x))
            {
                ivarsEqual = false;
            }
            if (!(_y == rhs._y))
            {
                ivarsEqual = false;
            }
            if (!(_z == rhs._z))
            {
                ivarsEqual = false;
            }

            return(ivarsEqual);
        }
예제 #2
0
        /**
          * The equals method doesn't always work--mostly on on classes that consist only of primitives. Be careful.
          */
        public bool equals(Vector3Double rhs)
        {
            bool ivarsEqual = true;

            if(rhs.GetType() != this.GetType())
            return false;

             if( ! (_x == rhs._x)) ivarsEqual = false;
             if( ! (_y == rhs._y)) ivarsEqual = false;
             if( ! (_z == rhs._z)) ivarsEqual = false;

            return ivarsEqual;
        }