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); }
public static void StructTest10() { ILRuntimeTest.TestFramework.TestVector3 vec = StructTest10Sub(); if (vec.X != 1) { throw new Exception(); } }
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); }
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); }
public static void ValueTypePerfTest(int a, string b, TestVector3 c, TestVectorClass d) { }
public void Test(out TestVector3 a, out float b) { b = 123f; a = this * 123f; }