2// ---------------------------------------------------------------------------
4// This file is a part of the CLHEP - a Class Library for High Energy Physics.
6// ----------------------------------------------------------------------
8// EulerAngles.icc - Inline methods for EulerAngles class.
11// 9-Apr-1997 MF Split off from original angles.hh. Content-free.
12// 26-Jan-1998 WEB Fleshed out.
13// 12-Mar-1998 WEB Gave default constructor proper default values
14// 13-Mar-1998 WEB Simplified compare()
15// 17-Jun-1998 WEB Added namespace support
16// 27-Jul-2000 MF CLHEP version
18// ----------------------------------------------------------------------
22inline HepEulerAngles::HepEulerAngles()
23: phi_( 0.0 ), theta_( 0.0 ), psi_( 0.0 )
24{} // HepEulerAngles::HepEulerAngles()
26inline HepEulerAngles::HepEulerAngles (
27 double phi1, double ttheta, double psi1 )
28 : phi_( phi1 ), theta_( ttheta ), psi_( psi1 )
29{} // HepEulerAngles::HepEulerAngles()
31inline double HepEulerAngles::getPhi() const {
33} // HepEulerAngles::getPhi()
35inline double HepEulerAngles::phi() const {
37} // HepEulerAngles::phi()
39inline HepEulerAngles & HepEulerAngles::setPhi( double phi1 ) {
42} // HepEulerAngles::setPhi()
44inline double HepEulerAngles::getTheta() const {
46} // HepEulerAngles::getTheta()
48inline double HepEulerAngles::theta() const {
50} // HepEulerAngles::theta()
52inline HepEulerAngles & HepEulerAngles::setTheta( double ttheta ) {
55} // HepEulerAngles::setTheta()
57inline double HepEulerAngles::getPsi() const {
59} // HepEulerAngles::getPsi()
61inline double HepEulerAngles::psi() const {
63} // HepEulerAngles::psi()
65inline HepEulerAngles & HepEulerAngles::setPsi( double psi1 ) {
68} // HepEulerAngles::setPsi()
70inline HepEulerAngles &
71 HepEulerAngles::set( double phi1, double ttheta, double psi1 ) {
72 phi_ = phi1, theta_ = ttheta, psi_ = psi1;
74} // HepEulerAngles::set()
77inline int HepEulerAngles::compare( const HepEulerAngles & ea ) const {
79 return phi_ < ea.phi_ ? -1
81 : theta_ < ea.theta_ ? -1
82 : theta_ > ea.theta_ ? +1
87} // HepEulerAngles::compare()
90inline bool HepEulerAngles::operator==( const HepEulerAngles & ea ) const {
91 return ( compare( ea ) == 0 );
92} // HepEulerAngles::operator==()
94inline bool HepEulerAngles::operator!=( const HepEulerAngles & ea ) const {
95 return ( compare( ea ) != 0 );
96} // HepEulerAngles::operator!=()
98inline bool HepEulerAngles::operator<( const HepEulerAngles & ea ) const {
99 return ( compare( ea ) < 0 );
100} // HepEulerAngles::operator<()
102inline bool HepEulerAngles::operator<=( const HepEulerAngles & ea ) const {
103 return ( compare( ea ) <= 0 );
104} // HepEulerAngles::operator<=()
106inline bool HepEulerAngles::operator>( const HepEulerAngles & ea ) const {
107 return ( compare( ea ) > 0 );
108} // HepEulerAngles::operator>()
110inline bool HepEulerAngles::operator>=( const HepEulerAngles & ea ) const {
111 return ( compare( ea ) >= 0 );
112} // HepEulerAngles::operator>=()
114inline double HepEulerAngles::getTolerance() {
116} // HepEulerAngles::getTolerance()
118inline double HepEulerAngles::setTolerance( double tol ) {
119 double oldTolerance( tolerance );
122} // HepEulerAngles::setTolerance()