10 const double Phase::_minPh = 0;
13 double Phase::rangeMax(){
14 return _minPh +
twopi;
16 double Phase::rangeMin(){
19 void Phase::toRange(){
20 while (_ph > rangeMax()) _ph -= 2 *
pi;
21 while (_ph < rangeMin()) _ph += 2 *
pi;
23 Phase::Phase(
const Phase& other)
47 Phase newPhase(*
this);
60 Phase newPhase(*
this);
65 Phase newPhase(*
this);
70 return _ph * 180.0/
pi;
74 os <<
" testing Phase object:" << endl;
77 <<
"( = " <<
testPhase.inDegrees() <<
" deg)" 80 os <<
" otherPhase(3) " << otherPhase
81 <<
"( = " << otherPhase.
inDegrees() <<
" deg)" 84 os <<
" sum of the two =" 86 <<
" deg \n difference: " 88 <<
" deg \n negative of testPhase "
Phase & operator/=(double rhs)
void testPhase(std::ostream &os=std::cout) const
static const double twopi
const Phase & operator+() const
Phase(const Phase &other)
Phase & operator+=(const Phase &rhs)
Phase & operator-=(const Phase &rhs)
Phase & operator *=(double rhs)