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 // ----------------------------------------------------------------------
22 inline HepEulerAngles::HepEulerAngles()
23 : phi_( 0.0 ), theta_( 0.0 ), psi_( 0.0 )
24 {} // HepEulerAngles::HepEulerAngles()
26 inline HepEulerAngles::HepEulerAngles (
27 double phi1, double theta1, double psi1 )
28 : phi_( phi1 ), theta_( theta1 ), psi_( psi1 )
29 {} // HepEulerAngles::HepEulerAngles()
31 inline double HepEulerAngles::getPhi() const {
33 } // HepEulerAngles::getPhi()
35 inline double HepEulerAngles::phi() const {
37 } // HepEulerAngles::phi()
39 inline HepEulerAngles & HepEulerAngles::setPhi( double phi1 ) {
42 } // HepEulerAngles::setPhi()
44 inline double HepEulerAngles::getTheta() const {
46 } // HepEulerAngles::getTheta()
48 inline double HepEulerAngles::theta() const {
50 } // HepEulerAngles::theta()
52 inline HepEulerAngles & HepEulerAngles::setTheta( double theta1 ) {
55 } // HepEulerAngles::setTheta()
57 inline double HepEulerAngles::getPsi() const {
59 } // HepEulerAngles::getPsi()
61 inline double HepEulerAngles::psi() const {
63 } // HepEulerAngles::psi()
65 inline HepEulerAngles & HepEulerAngles::setPsi( double psi1 ) {
68 } // HepEulerAngles::setPsi()
70 inline HepEulerAngles &
71 HepEulerAngles::set( double phi1, double theta1, double psi1 ) {
72 phi_ = phi1, theta_ = theta1, psi_ = psi1;
74 } // HepEulerAngles::set()
77 inline 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()
90 inline bool HepEulerAngles::operator==( const HepEulerAngles & ea ) const {
91 return ( compare( ea ) == 0 );
92 } // HepEulerAngles::operator==()
94 inline bool HepEulerAngles::operator!=( const HepEulerAngles & ea ) const {
95 return ( compare( ea ) != 0 );
96 } // HepEulerAngles::operator!=()
98 inline bool HepEulerAngles::operator<( const HepEulerAngles & ea ) const {
99 return ( compare( ea ) < 0 );
100 } // HepEulerAngles::operator<()
102 inline bool HepEulerAngles::operator<=( const HepEulerAngles & ea ) const {
103 return ( compare( ea ) <= 0 );
104 } // HepEulerAngles::operator<=()
106 inline bool HepEulerAngles::operator>( const HepEulerAngles & ea ) const {
107 return ( compare( ea ) > 0 );
108 } // HepEulerAngles::operator>()
110 inline bool HepEulerAngles::operator>=( const HepEulerAngles & ea ) const {
111 return ( compare( ea ) >= 0 );
112 } // HepEulerAngles::operator>=()
114 inline double HepEulerAngles::getTolerance() {
116 } // HepEulerAngles::getTolerance()
118 inline double HepEulerAngles::setTolerance( double tol ) {
119 double oldTolerance( tolerance );
122 } // HepEulerAngles::setTolerance()