11 #pragma implementation 
   26 static inline double safe_acos (
double x) {
 
   27   if (std::abs(x) <= 1.0) 
return std::acos(x);
 
   28   return ( (x>0) ? 0 : CLHEP::pi );
 
   32         its_d(proper(ddelta)), its_s(std::sin(ddelta)), its_c(std::cos(ddelta))
 
   45   } 
else if ( (
its_d < 0) || (
its_d == CLHEP::pi) )  {
 
   46     return +CLHEP::halfpi;
 
   48     return -CLHEP::halfpi;
 
   53   return  std::fabs( 
its_d );
 
   59   } 
else if ( (
its_d < 0) || (
its_d == CLHEP::pi) )  {
 
   60     return -CLHEP::halfpi;
 
   62     return +CLHEP::halfpi;
 
   79   return (
yx() == 0.0 && 
xx() == 0.0) ? 0.0 : std::atan2(
yx(),
xx());
 
   84   return (
yy() == 0.0 && 
xy() == 0.0) ? 0.0 : std::atan2(
yy(),
xy());
 
   89   return (
yz() == 0.0 && 
xz() == 0.0) ? 0.0 : std::atan2(
yz(),
xz());
 
   94   return safe_acos(
zx());
 
   98   return safe_acos(
zy());
 
  103   return safe_acos(
zz());  
 
  114   rotation = axisAngle();
 
  120   rotation = axisAngle();
 
  137   return (answer >= 0) ? answer : 0;
 
  141   double sum =        
xx() * r.
xx()          +  
xz() * r.
xz()
 
  144   double answer = 3.0 - sum;
 
  145   return (answer >= 0 ) ? answer : 0;
 
  152   double bet = b.
beta();
 
  153   double bet2 = bet*bet;
 
  175   return (
distance2(r) <= epsilon*epsilon);
 
  178   return (
distance2(r) <= epsilon*epsilon);
 
  181   return (
distance2(lt) <= epsilon*epsilon);
 
  184                                      double epsilon)
 const {
 
  185   return (
distance2(lt) <= epsilon*epsilon);
 
  189   return 2.0 - 2.0 * 
its_c;
 
  193   os << 
"\nRotation about Y (" << 
its_d <<
 
  194                 ") [cos d = " << 
its_c << 
" sin d = " << 
its_s << 
"]\n";