Example #1
0
        /// <summary>
        /// Két vektor akkor egyenlõ, ha ugyanabból a pontból indulnak ki és ugyanabban az irányba
        /// mutatnak és hosszuk is megegyezik.
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

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


            Vector other = (Vector)obj;

            if (!X.Equals(other.X))
            {
                return(false);
            }
            if (!Y.Equals(other.Y))
            {
                return(false);
            }
            if (!Vx.Equals(other.Vx))
            {
                return(false);
            }
            if (!Vy.Equals(other.Vy))
            {
                return(false);
            }

            return(true);
        }