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

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


            if (!(_psi == rhs._psi))
            {
                ivarsEqual = false;
            }
            if (!(_theta == rhs._theta))
            {
                ivarsEqual = false;
            }
            if (!(_phi == rhs._phi))
            {
                ivarsEqual = false;
            }

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

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

             if( ! (_psi == rhs._psi)) ivarsEqual = false;
             if( ! (_theta == rhs._theta)) ivarsEqual = false;
             if( ! (_phi == rhs._phi)) ivarsEqual = false;

            return ivarsEqual;
        }