Commit 33b6e83d authored by Lynn Garren's avatar Lynn Garren

clean up naming overlap between Units and internal Vector variables

parent f5d140bf
2012-11-14 Lynn Garren <garren@fnal.gov>
* Vector: clean up naming overlap between Units and internal variables
==============================
06.11.12 Release CLHEP-2.1.3.0
==============================
......
2012-11-14 Lynn Garren <garren@fnal.gov>
* Vector/Rotation.icc: fix a bug introduced when trying to stop shadowing complaints
* RotationX, RotationY, RotationZ: change the names of internal variables to
avoid possible confusion with Units
(tested in a controlled environment to avoid introducing any bugs)
==============================
06.11.12 Release CLHEP-2.1.3.0
==============================
......
......@@ -340,7 +340,7 @@ inline HepRotation operator * (const HepRotationZ & rz, const HepRotation & r){
HepRep3x3 mmm = r.rep3x3();
double c = rz.xx();
double ss = rz.yx();
return HepRotation ( c*mmm.xx_-s*mmm.yx_, c*mmm.xy_-s*mmm.yy_, c*mmm.xz_-ss*mmm.yz_,
return HepRotation ( c*mmm.xx_-ss*mmm.yx_, c*mmm.xy_-ss*mmm.yy_, c*mmm.xz_-ss*mmm.yz_,
ss*mmm.xx_+c*mmm.yx_, ss*mmm.xy_+c*mmm.yy_, ss*mmm.xz_+c*mmm.yz_,
mmm.zx_, mmm.zy_, mmm.zz_ );
}
......
......@@ -258,11 +258,11 @@ public:
protected:
double d;
double its_d;
// The angle of rotation.
double s;
double c;
double its_s;
double its_c;
// Cache the trig functions, for rapid operations.
inline HepRotationX ( double dd, double ss, double cc );
......
......@@ -12,10 +12,10 @@
namespace CLHEP {
inline double HepRotationX::yy() const { return c; }
inline double HepRotationX::yz() const { return -s; }
inline double HepRotationX::zy() const { return s; }
inline double HepRotationX::zz() const { return c; }
inline double HepRotationX::yy() const { return its_c; }
inline double HepRotationX::yz() const { return -its_s; }
inline double HepRotationX::zy() const { return its_s; }
inline double HepRotationX::zz() const { return its_c; }
inline double HepRotationX::xx() const { return 1.0; }
inline double HepRotationX::xy() const { return 0.0; }
......@@ -25,24 +25,24 @@ inline double HepRotationX::zx() const { return 0.0; }
inline HepRep3x3 HepRotationX::rep3x3() const {
return HepRep3x3 ( 1.0, 0.0, 0.0,
0.0, c, -s,
0.0, s, c );
0.0, its_c, -its_s,
0.0, its_s, its_c );
}
inline HepRotationX::HepRotationX() : d(0.0), s(0.0), c(1.0) {}
inline HepRotationX::HepRotationX() : its_d(0.0), its_s(0.0), its_c(1.0) {}
inline HepRotationX::HepRotationX(const HepRotationX & orig) :
d(orig.d), s(orig.s), c(orig.c)
its_d(orig.its_d), its_s(orig.its_s), its_c(orig.its_c)
{}
inline HepRotationX::HepRotationX(double dd, double ss, double cc) :
d(dd), s(ss), c(cc)
its_d(dd), its_s(ss), its_c(cc)
{}
inline HepRotationX & HepRotationX::operator= (const HepRotationX & orig) {
d = orig.d;
s = orig.s;
c = orig.c;
its_d = orig.its_d;
its_s = orig.its_s;
its_c = orig.its_c;
return *this;
}
......@@ -51,24 +51,24 @@ inline HepRotationX::~HepRotationX() {}
inline Hep3Vector HepRotationX::colX() const
{ return Hep3Vector ( 1.0, 0.0, 0.0 ); }
inline Hep3Vector HepRotationX::colY() const
{ return Hep3Vector ( 0.0, c, s ); }
{ return Hep3Vector ( 0.0, its_c, its_s ); }
inline Hep3Vector HepRotationX::colZ() const
{ return Hep3Vector ( 0.0, -s, c ); }
{ return Hep3Vector ( 0.0, -its_s, its_c ); }
inline Hep3Vector HepRotationX::rowX() const
{ return Hep3Vector ( 1.0, 0.0, 0.0 ); }
inline Hep3Vector HepRotationX::rowY() const
{ return Hep3Vector ( 0.0, c, -s ); }
{ return Hep3Vector ( 0.0, its_c, -its_s ); }
inline Hep3Vector HepRotationX::rowZ() const
{ return Hep3Vector ( 0.0, s, c ); }
{ return Hep3Vector ( 0.0, its_s, its_c ); }
inline double HepRotationX::getPhi () const { return phi(); }
inline double HepRotationX::getTheta() const { return theta(); }
inline double HepRotationX::getPsi () const { return psi(); }
inline double HepRotationX::getDelta() const { return d; }
inline double HepRotationX::getDelta() const { return its_d; }
inline Hep3Vector HepRotationX::getAxis () const { return axis(); }
inline double HepRotationX::delta() const { return d; }
inline double HepRotationX::delta() const { return its_d; }
inline Hep3Vector HepRotationX::axis() const { return Hep3Vector(1,0,0); }
inline HepAxisAngle HepRotationX::axisAngle() const {
......@@ -77,7 +77,7 @@ inline HepAxisAngle HepRotationX::axisAngle() const {
inline void HepRotationX::getAngleAxis
(double & ddelta, Hep3Vector & aaxis) const {
ddelta = d;
ddelta = its_d;
aaxis = getAxis();
}
......@@ -107,36 +107,36 @@ inline double HepRotationX::tt() const { return 1.0; }
inline HepRep4x4 HepRotationX::rep4x4() const {
return HepRep4x4 ( 1.0, 0.0, 0.0, 0.0,
0.0, c, -s, 0.0,
0.0, s, c, 0.0,
0.0, its_c, -its_s, 0.0,
0.0, its_s, its_c, 0.0,
0.0, 0.0, 0.0, 1.0 );
}
inline bool HepRotationX::isIdentity() const {
return ( d==0 );
return ( its_d==0 );
}
inline int HepRotationX::compare ( const HepRotationX & r ) const {
if (d > r.d) return 1; else if (d < r.d) return -1; else return 0;
if (its_d > r.its_d) return 1; else if (its_d < r.its_d) return -1; else return 0;
}
inline bool HepRotationX::operator==(const HepRotationX & r) const
{ return (d==r.d); }
{ return (its_d==r.its_d); }
inline bool HepRotationX::operator!=(const HepRotationX & r) const
{ return (d!=r.d); }
{ return (its_d!=r.its_d); }
inline bool HepRotationX::operator>=(const HepRotationX & r) const
{ return (d>=r.d); }
{ return (its_d>=r.its_d); }
inline bool HepRotationX::operator<=(const HepRotationX & r) const
{ return (d<=r.d); }
{ return (its_d<=r.its_d); }
inline bool HepRotationX::operator> (const HepRotationX & r) const
{ return (d> r.d); }
{ return (its_d> r.its_d); }
inline bool HepRotationX::operator< (const HepRotationX & r) const
{ return (d< r.d); }
{ return (its_d< r.its_d); }
inline void HepRotationX::rectify() {
d = proper(d); // Just in case!
s = std::sin(d);
c = std::cos(d);
its_d = proper(its_d); // Just in case!
its_s = std::sin(its_d);
its_c = std::cos(its_d);
}
inline Hep3Vector HepRotationX::operator() (const Hep3Vector & p) const {
......@@ -144,8 +144,8 @@ inline Hep3Vector HepRotationX::operator() (const Hep3Vector & p) const {
double y = p.y();
double z = p.z();
return Hep3Vector( x,
y * c - z * s,
z * c + y * s );
y * its_c - z * its_s,
z * its_c + y * its_s );
}
inline Hep3Vector HepRotationX::operator * (const Hep3Vector & p) const {
......@@ -181,13 +181,13 @@ inline double HepRotationX::proper( double ddelta ) {
} // proper()
inline HepRotationX HepRotationX::operator * ( const HepRotationX & rx ) const {
return HepRotationX ( HepRotationX::proper(d+rx.d),
s*rx.c + c*rx.s,
c*rx.c - s*rx.s );
return HepRotationX ( HepRotationX::proper(its_d+rx.its_d),
its_s*rx.its_c + its_c*rx.its_s,
its_c*rx.its_c - its_s*rx.its_s );
}
inline HepRotationX HepRotationX::inverse() const {
return HepRotationX( proper(-d), -s, c );
return HepRotationX( proper(-its_d), -its_s, its_c );
}
inline HepRotationX inverseOf(const HepRotationX & r) {
......
......@@ -257,11 +257,11 @@ public:
protected:
double d;
double its_d;
// The angle of rotation.
double s;
double c;
double its_s;
double its_c;
// Cache the trig functions, for rapid operations.
inline HepRotationY ( double dd, double ss, double cc );
......
......@@ -12,10 +12,10 @@
namespace CLHEP {
inline double HepRotationY::xx() const { return c; }
inline double HepRotationY::xz() const { return s; }
inline double HepRotationY::zx() const { return -s; }
inline double HepRotationY::zz() const { return c; }
inline double HepRotationY::xx() const { return its_c; }
inline double HepRotationY::xz() const { return its_s; }
inline double HepRotationY::zx() const { return -its_s; }
inline double HepRotationY::zz() const { return its_c; }
inline double HepRotationY::yy() const { return 1.0; }
inline double HepRotationY::yx() const { return 0.0; }
......@@ -24,51 +24,51 @@ inline double HepRotationY::xy() const { return 0.0; }
inline double HepRotationY::zy() const { return 0.0; }
inline HepRep3x3 HepRotationY::rep3x3() const {
return HepRep3x3 ( c , 0.0, s,
0.0, 1.0, 0.0,
-s , 0.0, c );
return HepRep3x3 ( its_c , 0.0, its_s,
0.0, 1.0, 0.0,
-its_s , 0.0, its_c );
}
inline HepRotationY::HepRotationY() : d(0.0), s(0.0), c(1.0) {}
inline HepRotationY::HepRotationY() : its_d(0.0), its_s(0.0), its_c(1.0) {}
inline HepRotationY::HepRotationY(const HepRotationY & orig) :
d(orig.d), s(orig.s), c(orig.c)
its_d(orig.its_d), its_s(orig.its_s), its_c(orig.its_c)
{}
inline HepRotationY::HepRotationY(double dd, double ss, double cc) :
d(dd), s(ss), c(cc)
its_d(dd), its_s(ss), its_c(cc)
{}
inline HepRotationY & HepRotationY::operator= (const HepRotationY & orig) {
d = orig.d;
s = orig.s;
c = orig.c;
its_d = orig.its_d;
its_s = orig.its_s;
its_c = orig.its_c;
return *this;
}
inline HepRotationY::~HepRotationY() {}
inline Hep3Vector HepRotationY::colX() const
{ return Hep3Vector ( c, 0.0, -s ); }
{ return Hep3Vector ( its_c, 0.0, -its_s ); }
inline Hep3Vector HepRotationY::colY() const
{ return Hep3Vector ( 0.0, 1.0, 0.0 ); }
inline Hep3Vector HepRotationY::colZ() const
{ return Hep3Vector ( s, 0.0, c ); }
{ return Hep3Vector ( its_s, 0.0, its_c ); }
inline Hep3Vector HepRotationY::rowX() const
{ return Hep3Vector ( c, 0.0, s ); }
{ return Hep3Vector ( its_c, 0.0, its_s ); }
inline Hep3Vector HepRotationY::rowY() const
{ return Hep3Vector ( 0.0, 1.0, 0.0 ); }
inline Hep3Vector HepRotationY::rowZ() const
{ return Hep3Vector ( -s, 0.0, c ); }
{ return Hep3Vector ( -its_s, 0.0, its_c ); }
inline double HepRotationY::getPhi () const { return phi(); }
inline double HepRotationY::getTheta() const { return theta(); }
inline double HepRotationY::getPsi () const { return psi(); }
inline double HepRotationY::getDelta() const { return d; }
inline double HepRotationY::getDelta() const { return its_d; }
inline Hep3Vector HepRotationY::getAxis () const { return axis(); }
inline double HepRotationY::delta() const { return d; }
inline double HepRotationY::delta() const { return its_d; }
inline Hep3Vector HepRotationY::axis() const { return Hep3Vector(0,1,0); }
inline HepAxisAngle HepRotationY::axisAngle() const {
......@@ -77,45 +77,45 @@ inline HepAxisAngle HepRotationY::axisAngle() const {
inline void HepRotationY::getAngleAxis
(double & ddelta, Hep3Vector & aaxis) const {
ddelta = d;
ddelta = its_d;
aaxis = getAxis();
}
inline bool HepRotationY::isIdentity() const {
return ( d==0 );
return ( its_d==0 );
}
inline int HepRotationY::compare ( const HepRotationY & r ) const {
if (d > r.d) return 1; else if (d < r.d) return -1; else return 0;
if (its_d > r.its_d) return 1; else if (its_d < r.its_d) return -1; else return 0;
}
inline bool HepRotationY::operator==(const HepRotationY & r) const
{ return (d==r.d); }
{ return (its_d==r.its_d); }
inline bool HepRotationY::operator!=(const HepRotationY & r) const
{ return (d!=r.d); }
{ return (its_d!=r.its_d); }
inline bool HepRotationY::operator>=(const HepRotationY & r) const
{ return (d>=r.d); }
{ return (its_d>=r.its_d); }
inline bool HepRotationY::operator<=(const HepRotationY & r) const
{ return (d<=r.d); }
{ return (its_d<=r.its_d); }
inline bool HepRotationY::operator> (const HepRotationY & r) const
{ return (d> r.d); }
{ return (its_d> r.its_d); }
inline bool HepRotationY::operator< (const HepRotationY & r) const
{ return (d< r.d); }
{ return (its_d< r.its_d); }
inline void HepRotationY::rectify() {
d = proper(d); // Just in case!
s = std::sin(d);
c = std::cos(d);
its_d = proper(its_d); // Just in case!
its_s = std::sin(its_d);
its_c = std::cos(its_d);
}
inline Hep3Vector HepRotationY::operator() (const Hep3Vector & p) const {
double x = p.x();
double y = p.y();
double z = p.z();
return Hep3Vector( x * c + z * s,
return Hep3Vector( x * its_c + z * its_s,
y,
z * c - x * s );
z * its_c - x * its_s );
}
inline Hep3Vector HepRotationY::operator * (const Hep3Vector & p) const {
......@@ -141,7 +141,7 @@ inline HepRotationY & HepRotationY::transform(const HepRotationY & m1) {
}
inline double HepRotationY::proper( double ddelta ) {
// -PI < d <= PI
// -PI < its_d <= PI
if ( std::fabs(ddelta) < CLHEP::pi ) {
return ddelta;
} else {
......@@ -151,13 +151,13 @@ inline double HepRotationY::proper( double ddelta ) {
} // proper()
inline HepRotationY HepRotationY::operator * ( const HepRotationY & ry ) const {
return HepRotationY ( HepRotationY::proper(d+ry.d),
s*ry.c + c*ry.s,
c*ry.c - s*ry.s );
return HepRotationY ( HepRotationY::proper(its_d+ry.its_d),
its_s*ry.its_c + its_c*ry.its_s,
its_c*ry.its_c - its_s*ry.its_s );
}
inline HepRotationY HepRotationY::inverse() const {
return HepRotationY( proper(-d), -s, c );
return HepRotationY( proper(-its_d), -its_s, its_c );
}
inline HepRotationY inverseOf(const HepRotationY & r) {
......@@ -193,10 +193,10 @@ inline double HepRotationY::tz() const { return 0.0; }
inline double HepRotationY::tt() const { return 1.0; }
inline HepRep4x4 HepRotationY::rep4x4() const {
return HepRep4x4 ( c , 0.0, s, 0.0,
0.0, 1.0, 0.0, 0.0,
-s , 0.0, c, 0.0,
0.0, 0.0, 0.0, 1.0 );
return HepRep4x4 ( its_c , 0.0, its_s, 0.0,
0.0, 1.0, 0.0, 0.0,
-its_s, 0.0, its_c, 0.0,
0.0, 0.0, 0.0, 1.0 );
}
inline double HepRotationY::getTolerance() {
......
......@@ -259,11 +259,11 @@ public:
protected:
double d;
double its_d;
// The angle of rotation.
double s;
double c;
double its_s;
double its_c;
// Cache the trig functions, for rapid operations.
inline HepRotationZ ( double dd, double ss, double cc );
......
......@@ -12,10 +12,10 @@
namespace CLHEP {
inline double HepRotationZ::xx() const { return c; }
inline double HepRotationZ::xy() const { return -s; }
inline double HepRotationZ::yx() const { return s; }
inline double HepRotationZ::yy() const { return c; }
inline double HepRotationZ::xx() const { return its_c; }
inline double HepRotationZ::xy() const { return -its_s; }
inline double HepRotationZ::yx() const { return its_s; }
inline double HepRotationZ::yy() const { return its_c; }
inline double HepRotationZ::zz() const { return 1.0; }
inline double HepRotationZ::zy() const { return 0.0; }
......@@ -24,51 +24,51 @@ inline double HepRotationZ::yz() const { return 0.0; }
inline double HepRotationZ::xz() const { return 0.0; }
inline HepRep3x3 HepRotationZ::rep3x3() const {
return HepRep3x3 ( c, -s, 0.0,
s, c, 0.0,
0.0, 0.0, 1.0 );
return HepRep3x3 ( its_c, -its_s, 0.0,
its_s, its_c, 0.0,
0.0, 0.0, 1.0 );
}
inline HepRotationZ::HepRotationZ() : d(0.0), s(0.0), c(1.0) {}
inline HepRotationZ::HepRotationZ() : its_d(0.0), its_s(0.0), its_c(1.0) {}
inline HepRotationZ::HepRotationZ(const HepRotationZ & orig) :
d(orig.d), s(orig.s), c(orig.c)
its_d(orig.its_d), its_s(orig.its_s), its_c(orig.its_c)
{}
inline HepRotationZ::HepRotationZ(double dd, double ss, double cc) :
d(dd), s(ss), c(cc)
its_d(dd), its_s(ss), its_c(cc)
{}
inline HepRotationZ & HepRotationZ::operator= (const HepRotationZ & orig) {
d = orig.d;
s = orig.s;
c = orig.c;
its_d = orig.its_d;
its_s = orig.its_s;
its_c = orig.its_c;
return *this;
}
inline HepRotationZ::~HepRotationZ() {}
inline Hep3Vector HepRotationZ::colX() const
{ return Hep3Vector ( c, s, 0.0 ); }
{ return Hep3Vector ( its_c, its_s, 0.0 ); }
inline Hep3Vector HepRotationZ::colY() const
{ return Hep3Vector ( -s, c, 0.0 ); }
{ return Hep3Vector ( -its_s, its_c, 0.0 ); }
inline Hep3Vector HepRotationZ::colZ() const
{ return Hep3Vector ( 0.0, 0.0, 1.0 ); }
inline Hep3Vector HepRotationZ::rowX() const
{ return Hep3Vector ( c, -s, 0.0 ); }
{ return Hep3Vector ( its_c, -its_s, 0.0 ); }
inline Hep3Vector HepRotationZ::rowY() const
{ return Hep3Vector ( s, c, 0.0 ); }
{ return Hep3Vector ( its_s, its_c, 0.0 ); }
inline Hep3Vector HepRotationZ::rowZ() const
{ return Hep3Vector ( 0.0, 0.0, 1.0 ); }
inline double HepRotationZ::getPhi () const { return phi(); }
inline double HepRotationZ::getTheta() const { return theta(); }
inline double HepRotationZ::getPsi () const { return psi(); }
inline double HepRotationZ::getDelta() const { return d; }
inline double HepRotationZ::getDelta() const { return its_d; }
inline Hep3Vector HepRotationZ::getAxis () const { return axis(); }
inline double HepRotationZ::delta() const { return d; }
inline double HepRotationZ::delta() const { return its_d; }
inline Hep3Vector HepRotationZ::axis() const { return Hep3Vector(0,0,1); }
inline HepAxisAngle HepRotationZ::axisAngle() const {
......@@ -77,43 +77,43 @@ inline HepAxisAngle HepRotationZ::axisAngle() const {
inline void HepRotationZ::getAngleAxis
(double & ddelta, Hep3Vector & aaxis) const {
ddelta = d;
ddelta = its_d;
aaxis = getAxis();
}
inline bool HepRotationZ::isIdentity() const {
return ( d==0 );
return ( its_d==0 );
}
inline int HepRotationZ::compare ( const HepRotationZ & r ) const {
if (d > r.d) return 1; else if (d < r.d) return -1; else return 0;
if (its_d > r.its_d) return 1; else if (its_d < r.its_d) return -1; else return 0;
}
inline bool HepRotationZ::operator==(const HepRotationZ & r) const
{ return (d==r.d); }
{ return (its_d==r.its_d); }
inline bool HepRotationZ::operator!=(const HepRotationZ & r) const
{ return (d!=r.d); }
{ return (its_d!=r.its_d); }
inline bool HepRotationZ::operator>=(const HepRotationZ & r) const
{ return (d>=r.d); }
{ return (its_d>=r.its_d); }
inline bool HepRotationZ::operator<=(const HepRotationZ & r) const
{ return (d<=r.d); }
{ return (its_d<=r.its_d); }
inline bool HepRotationZ::operator> (const HepRotationZ & r) const
{ return (d> r.d); }
{ return (its_d> r.its_d); }
inline bool HepRotationZ::operator< (const HepRotationZ & r) const
{ return (d< r.d); }
{ return (its_d< r.its_d); }
inline void HepRotationZ::rectify() {
d = proper(d); // Just in case!
s = std::sin(d);
c = std::cos(d);
its_d = proper(its_d); // Just in case!
its_s = std::sin(its_d);
its_c = std::cos(its_d);
}
inline Hep3Vector HepRotationZ::operator() (const Hep3Vector & p) const {
double x = p.x();
double y = p.y();
double z = p.z();
return Hep3Vector( x * c - y * s,
x * s + y * c,
return Hep3Vector( x * its_c - y * its_s,
x * its_s + y * its_c,
z );
}
......@@ -150,13 +150,13 @@ inline double HepRotationZ::proper( double ddelta ) {
} // proper()
inline HepRotationZ HepRotationZ::operator * ( const HepRotationZ & rz ) const {
return HepRotationZ ( HepRotationZ::proper(d+rz.d),
s*rz.c + c*rz.s,
c*rz.c - s*rz.s );
return HepRotationZ ( HepRotationZ::proper(its_d+rz.its_d),
its_s*rz.its_c + its_c*rz.its_s,
its_c*rz.its_c - its_s*rz.its_s );
}
inline HepRotationZ HepRotationZ::inverse() const {
return HepRotationZ( proper(-d), -s, c );
return HepRotationZ( proper(-its_d), -its_s, its_c );
}
inline HepRotationZ inverseOf(const HepRotationZ & r) {
......@@ -192,10 +192,10 @@ inline double HepRotationZ::tz() const { return 0.0; }
inline double HepRotationZ::tt() const { return 1.0; }
inline HepRep4x4 HepRotationZ::rep4x4() const {
return HepRep4x4 ( c, -s, 0.0, 0.0,
s, c, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 0.0, 1.0 );
return HepRep4x4 ( its_c, -its_s, 0.0, 0.0,
its_s, its_c, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 0.0, 1.0 );
}
inline double HepRotationZ::getTolerance() {
......
......@@ -30,18 +30,18 @@ static inline double safe_acos (double x) {
}
HepRotationX::HepRotationX(double ddelta) :
d(proper(ddelta)), s(std::sin(ddelta)), c(std::cos(ddelta))
its_d(proper(ddelta)), its_s(std::sin(ddelta)), its_c(std::cos(ddelta))
{}
HepRotationX & HepRotationX::set ( double ddelta ) {
d = proper(ddelta);
s = std::sin(d);
c = std::cos(d);
its_d = proper(ddelta);
its_s = std::sin(its_d);
its_c = std::cos(its_d);
return *this;
}
double HepRotationX::phi() const {
if ( (d > 0) && (d < CLHEP::pi) ) {
if ( (its_d > 0) && (its_d < CLHEP::pi) ) {
return CLHEP::pi;
} else {
return 0.0;
......@@ -49,11 +49,11 @@ double HepRotationX::phi() const {
} // HepRotationX::phi()
double HepRotationX::theta() const {
return std::fabs( d );
return std::fabs( its_d );
} // HepRotationX::theta()
double HepRotationX::psi() const {
if ( (d > 0) && (d < CLHEP::pi) ) {
if ( (its_d > 0) && (its_d < CLHEP::pi) ) {
return CLHEP::pi;
} else {
return 0.0;
......@@ -130,7 +130,7 @@ void HepRotationX::decompose
}
double HepRotationX::distance2( const HepRotationX & r ) const {
double answer = 2.0 * ( 1.0 - ( s * r.s + c * r.c ) ) ;
double answer = 2.0 * ( 1.0 - ( its_s * r.its_s + its_c * r.its_c ) ) ;
return (answer >= 0) ? answer : 0;
}
......@@ -184,12 +184,12 @@ bool HepRotationX::isNear( const HepLorentzRotation & lt,
}
double HepRotationX::norm2() const {
return 2.0 - 2.0 * c;