# | Line 391 | Line 391 | addrot( /* compute rotation (x,y,z) => (xp,yp,zp) */ | |
---|---|---|
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)) { |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |