391 |
|
int n; |
392 |
|
double theta; |
393 |
|
|
394 |
+ |
if (yp[2]*yp[2] + zp[2]*zp[2] < 2.*FTINY*FTINY) { |
395 |
+ |
/* Special case for X' along Z-axis */ |
396 |
+ |
theta = -atan2(yp[0], yp[1]); |
397 |
+ |
sprintf(xf, " -ry %f -rz %f", |
398 |
+ |
xp[2] < 0.0 ? 90.0 : -90.0, |
399 |
+ |
theta*(180./PI)); |
400 |
+ |
return(4); |
401 |
+ |
} |
402 |
|
n = 0; |
403 |
|
theta = atan2(yp[2], zp[2]); |
404 |
|
if (!FEQ(theta,0.0)) { |
406 |
|
while (*xf) ++xf; |
407 |
|
n += 2; |
408 |
|
} |
409 |
< |
theta = asin(-xp[2]); |
409 |
> |
theta = Asin(-xp[2]); |
410 |
|
if (!FEQ(theta,0.0)) { |
411 |
|
sprintf(xf, " -ry %f", theta*(180./PI)); |
412 |
|
while (*xf) ++xf; |