Originally Posted by
vart
why not pass the member by value?
Code:
function (float y,...)
switch (j) {
case 0:
f = y + ...;
break;
case 1:
f = X - y;
break;
case 2:
f = y + 2;
break;
}
I forgot to mention that f is also a struct and has the same members. Actually, it should be something like:
Code:
function (member y,...)
switch (j) {
case 0:
f.y = test.y + ...;
break;
case 1:
f.y = X - test.y;
break;
case 2:
f.y = test.y + 2;
break;
}
That is, if I pass the member .u, f.u should be calculated, if I pass .v, f.v should be calculated, and so on. Maybe I could pass simply f.u by reference.
Code:
function(&f.u,test.u);
function(&f.v,test.v);
function(&f.w,test.w);
Do you think it would work like that ?