git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/applied-gslp@143
0e905424-1750-4201-adbd-
bf076348bc1c
return norm_rad1(theta);
}
-double norm_rad2(theta)
+double norm_rad1(theta)
double theta;
{
const double T = 2 * M_PI;
- theta / T;
/*
while( theta < -M_PI || M_PI <= theta ){
*/
return theta;
}
-double norm_rad1(theta)
+double norm_rad2(theta)
double theta;
{
const double T = 2 * M_PI;
- /*
- while( theta < -M_PI || M_PI <= theta ){
- */
- while (gsl_fcmp(theta, -M_PI, GSL_DBL_EPSILON) < 0
- || gsl_fcmp(M_PI, theta, GSL_DBL_EPSILON) <= 0) {
- theta -= GSL_SIGN(theta) * T;
- }
- return theta;
+ return theta / T;
}
void norm_rad_test(a)