public static int test_0_Value_On_Stack_Local_Copy_Managed() { var vector3Pair = new winx64_vector3PairStruct { first = new winx64_vector3Struct(1, 2, 3) }; var local2 = new winx64_vector3Struct(1, 1, 1); var local1 = vector3Pair.first; vector3Pair.first = winx64_vector3Struct.Add(local1, local2); vector3Pair.second = winx64_vector3Struct.Add(local1, local2); return((vector3Pair.second.x == 2 && vector3Pair.second.y == 3 && vector3Pair.second.z == 4) ? 0 : 1); }
static void Add(ref winx64_vector3Struct a, ref winx64_vector3Struct b, out winx64_vector3Struct result) { result.x = a.x + b.x; result.y = a.y + b.y; result.z = a.z + b.z; }
public static winx64_vector3Struct Add(winx64_vector3Struct a, winx64_vector3Struct b) { Add(ref a, ref b, out a); return(a); }