00001 //-------------------------------------------------------------------------- 00002 // 00003 // Description: 00004 // Class BesAngle 00005 // 00006 //------------------------------------------------------------------------ 00007 #include "MdcGeom/BesAngle.h" 00008 00009 //------------------------------- 00010 // Collaborating Class Headers -- 00011 //------------------------------- 00012 #include "MdcGeom/Constants.h" 00013 00014 //----------------------------------------------------------------------- 00015 // Local Macros, Typedefs, Structures, Unions and Forward Declarations -- 00016 //----------------------------------------------------------------------- 00017 00018 const double BesAngle::pi = Constants::pi; 00019 const double BesAngle::twoPi = Constants::twoPi; 00020 const double BesAngle::toDegrees = Constants::radToDegrees; 00021 /* hxt 00022 // The followings characters are used in DegString() 00023 // for printout in degrees 00024 #ifdef HPUX 00025 const HepString BesAngle::degChar = "°"; 00026 #else 00027 const HepString BesAngle::degChar = "^"; 00028 #endif 00029 00030 const HepString BesAngle::deg1Char = "'"; 00031 const HepString BesAngle::deg2Char = "\""; 00032 00033 // ---------------------------------------- 00034 // -- Public Function Member Definitions -- 00035 // ---------------------------------------- 00036 00037 HepString BesAngle::degString() const 00038 { 00039 float tmp; 00040 int deg, deg_, deg__; 00041 HepString sign = ""; 00042 00043 if ((tmp = this->deg()) < 0) 00044 { sign = "-"; tmp = -tmp; }; 00045 deg = int(tmp); 00046 deg_ = int(tmp = 60*(tmp - deg)); 00047 deg__ = int(60*(tmp - deg_)); 00048 00049 return 00050 ( 00051 sign + 00052 HepString(deg)+degChar+ 00053 HepString(deg_)+deg1Char+ 00054 HepString(deg__)+deg2Char 00055 ); 00056 } 00057 00058 hxt */