Пример #1
0
        public static void UnitTest_10027()
        {
            TestVectorClass cls = new TestVectorClass();

            cls.vector = new TestVector3(123, 123, 123);

            Console.WriteLine("x:" + cls.vector.X + " y:" + cls.vector.Y + " z:" + cls.vector.Z);
        }
Пример #2
0
        public static void UnitTest_10032()
        {
            TestVectorClass VTest = new TestVectorClass();

            TestVector3 value = VTest.vector;

            value.Normalize();
            VTest.vector.Normalize();
            Console.WriteLine("Vector3BindingTest local Vector3 normalized = " + value);
            Console.WriteLine("Vector3BindingTest Vector3 normalized = " + VTest.vector);
        }
Пример #3
0
        public static void UnitTest_Performance11()
        {
            TestVectorClass a = new TestVectorClass();

            System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();
            sw.Start();
            for (int i = 0; i < 1000000; i++)
            {
                TestVectorClass.ValueTypePerfTest2(i, "b", a.Obj, a);
            }
            sw.Stop();
            Console.WriteLine(string.Format("time=" + sw.ElapsedMilliseconds + ", cps:{0:0}", (1000000 * 1000 / sw.ElapsedMilliseconds)));
        }
Пример #4
0
        public static void UnitTest_10048()
        {
            TestVectorClass cls  = new TestVectorClass();
            TestVectorClass cls2 = new TestVectorClass();

            for (int i = 0; i < 3; i++)
            {
                cls.Vector2 = cls2.Vector2 = new TestVector3(3, 4, i);
                Console.WriteLine(cls.Vector2);
            }

            if (cls.Vector2.Z != 2)
            {
                throw new Exception($"cls.Vector2.Z == {cls.Vector2.Z}");
            }
        }