Exemplo n.º 1
0
        public static VectorInt2 operator +(VectorInt2 lhs, VectorInt2 rhs)
        {
            VectorInt2 result = new VectorInt2(lhs);

            result.x += rhs.x;
            result.y += rhs.y;
            return(result);
        }
Exemplo n.º 2
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            if (obj.GetType() != this.GetType())
            {
                return(false);
            }
            VectorInt2 v = (VectorInt2)(obj);// as VectorInt2;

            if (this.x != v.x || this.y != v.y)
            {
                return(false);
            }
            return(true);
        }
Exemplo n.º 3
0
 public VectorInt2(VectorInt2 v2)
 {
     this.x = v2.x;
     this.y = v2.y;
 }