Ejemplo n.º 1
0
        static ILRuntimeTest.TestFramework.TestVector3 StructTest10Sub()
        {
            ILRuntimeTest.TestFramework.TestVector3 res = ILRuntimeTest.TestFramework.TestVector3.One2;
            switch (res.X)
            {
            case 2:
                Console.WriteLine("113");
                break;

            case 6:
                Console.WriteLine("1136");
                break;

            case 100:
                Console.WriteLine("11399");
                break;

            case 133:
                Console.WriteLine("1131");
                break;
            }
            object[] arr = new object[] { res };
            Console.WriteLine("vec=" + arr[0]);
            return(res);
        }
Ejemplo n.º 2
0
 public static void StructTest10()
 {
     ILRuntimeTest.TestFramework.TestVector3 vec = StructTest10Sub();
     if (vec.X != 1)
     {
         throw new Exception();
     }
 }
Ejemplo n.º 3
0
        public static TestVector3 operator +(TestVector3 a, TestVector3 b)
        {
            TestVector3 res = new TestVector3();

            res.X = a.X + b.X;
            res.Y = a.Y + b.Y;
            res.Z = a.Z + b.Z;

            return(res);
        }
Ejemplo n.º 4
0
        public static TestVector3 operator *(TestVector3 a, float b)
        {
            TestVector3 res = new TestVector3();

            res.X = a.X * b;
            res.Y = a.Y * b;
            res.Z = a.Z * b;

            return(res);
        }
Ejemplo n.º 5
0
 public static void ValueTypePerfTest(int a, string b, TestVector3 c, TestVectorClass d)
 {
 }
Ejemplo n.º 6
0
 public void Test(out TestVector3 a, out float b)
 {
     b = 123f;
     a = this * 123f;
 }