Exemplo n.º 1
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);
        }
Exemplo n.º 2
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);
        }