C/C++の宿題片付けます 127代目
■ このスレッドは過去ログ倉庫に格納されています
0394デフォルトの名無しさん
2009/06/15(月) 10:49:42double* rotation(int degree, double x[]){
double *y, theta;
y=calloc(sizeof(double),2);
theta=M_PI*degree/180;
y[0]=x[0]*cos(theta)-x[1]*sin(theta);
y[1]=x[0]*sin(theta)+x[1]*cos(theta);
return y;
}
■ このスレッドは過去ログ倉庫に格納されています