Exemplo n.º 1
0
        //[Test("VMath.Add(IVector2,IVector2,IBufferedVector2D)")]
        private static void Test_Vector2d_VMath_Add(int count)
        {
            Essence.Maths.Prueba.BufferedVector2d aux = new Essence.Maths.Prueba.BufferedVector2d();
            double x = 0, y = 0;

            Essence.Maths.Prueba.Vector2d v1 = new Essence.Maths.Prueba.Vector2d(10, 10);
            Essence.Maths.Prueba.Vector2d v2 = new Essence.Maths.Prueba.Vector2d(10, 10);
            for (int i = 0; i < count; i++)
            {
                Essence.Maths.Prueba.VMath.Add(v1, v2, aux);
                x += aux.X;
                y += aux.Y;
            }
            Console.WriteLine("result : " + x + " ; " + y + " " + aux);
        }
Exemplo n.º 2
0
        //[Test("IVector2.Add(IVector2) : IVector2")]
        private static void Test_IVector2D_Add_Func(int count)
        {
            Essence.Maths.Prueba.BufferedVector2d aux = new Essence.Maths.Prueba.BufferedVector2d();
            double x = 0, y = 0;

            Essence.Maths.Prueba.IVector2 v1 = new Essence.Maths.Prueba.Vector2d(10, 10);
            Essence.Maths.Prueba.IVector2 v2 = new Essence.Maths.Prueba.Vector2d(10, 10);
            for (int i = 0; i < count; i++)
            {
                Essence.Maths.Prueba.IVector2 v3 = v1.Add(v2);
                v3.GetCoords(aux);
                x += aux.X;
                y += aux.Y;
            }
            Console.WriteLine("result : " + x + " ; " + y + " ");
        }