Esempio n. 1
0
        public void Sub(IVector2 v, IBufferedVector2D result)
        {
            Vector2d v2 = v as Vector2d;

            if (v2 != null)
            {
                this.Sub(v2, result);
            }
        }
Esempio n. 2
0
        public void Add(IVector2 a, IVector2 b, IBufferedVector2D result)
        {
            a.GetCoords(aux);
            double x = aux.X;
            double y = aux.Y;

            b.GetCoords(aux);
            x += aux.X;
            y += aux.Y;

            result.SetCoords(x, y);
        }
Esempio n. 3
0
        public static void Add(IVector2 a, IVector2 b, IBufferedVector2D result)
        {
            BufferedTuple2d aux = new BufferedTuple2d();

            a.GetCoords(aux);
            double x = aux.X;
            double y = aux.Y;

            b.GetCoords(aux);
            x += aux.X;
            y += aux.Y;

            result.SetCoords(x, y);
        }
Esempio n. 4
0
        public void Sub(IVector2 v, IBufferedVector2D result)
        {
            BufferedVector2d bv = v as BufferedVector2d;

            if (bv != null)
            {
                result.SetCoords(this.X - bv.X, this.Y - bv.Y);
                return;
            }
            Vector2d sv = v as Vector2d;

            if (sv != null)
            {
                result.SetCoords(this.X - sv.x, this.Y - sv.y);
                return;
            }
            result.SetCoords(this.X - v.GetXDouble(), this.Y - v.GetYDouble());
        }
Esempio n. 5
0
 public static void Add2(IVector2 a, IVector2 b, IBufferedVector2D result)
 {
     result.SetCoords(a.GetXDouble() + b.GetXDouble(), a.GetYDouble() + b.GetYDouble());
 }
Esempio n. 6
0
 public void Add2(IVector2 v, IBufferedVector2D result)
 {
     result.SetCoords(this.X + v.GetXDouble(), this.Y + v.GetYDouble());
 }
Esempio n. 7
0
 public void Mul(double t, IBufferedVector2D result)
 {
     result.SetCoords(this.X * t, this.Y * t);
 }
Esempio n. 8
0
 public void Mul(double v, IBufferedVector2D result)
 {
     result.SetCoords(this.x * v, this.y * v);
 }
Esempio n. 9
0
 public void Sub(Vector2d v, IBufferedVector2D result)
 {
     result.SetCoords(this.x - v.x, this.y - v.y);
 }
Esempio n. 10
0
 public void Add(Vector2d v, IBufferedVector2D result)
 {
     result.SetCoords(this.x + v.x, this.y + v.y);
 }