Beispiel #1
0
        //[Test("Vector2d.Add(Vector2d,IBufferedVector2D)")]
        private static void Test_Vector2d_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++)
            {
                v1.Add(v2, aux);
                x += aux.X;
                y += aux.Y;
            }
            Console.WriteLine("result : " + x + " ; " + y);
        }
Beispiel #2
0
        //[Test("Vector2d.Add(Vector2d) : Vector2d")]
        private static void Test_Vector2d_Add_Func(int count)
        {
            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);
            Essence.Maths.Prueba.Vector2d v3;
            for (int i = 0; i < count; i++)
            {
                v3 = v1.Add(v2);
                x += v3.x;
                y += v3.y;
            }
            Console.WriteLine("result : " + x + " ; " + y);
        }
Beispiel #3
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 + " ");
        }