When I change a parameter inside a function, does it change for the caller, too?

Viewed 46953

I have written a function below:

void trans(double x,double y,double theta,double m,double n)
{
    m=cos(theta)*x+sin(theta)*y;
    n=-sin(theta)*x+cos(theta)*y;
}

If I call them in the same file by

trans(center_x,center_y,angle,xc,yc);

will the value of xc and yc change? If not, what should I do?

4 Answers
Related