00001 #ifndef QRK_ANGLE_H 00002 #define QRK_ANGLE_H 00003 00014 namespace qrk 00015 { 00019 class Angle 00020 { 00021 public: 00022 Angle(void); 00023 Angle(const Angle& rhs); 00024 00025 Angle& operator = (const Angle& rhs); 00026 Angle& operator += (const Angle& rhs); 00027 const Angle operator + (const Angle& rhs) const; 00028 Angle& operator -= (const Angle& rhs); 00029 const Angle operator - (const Angle& rhs) const; 00030 Angle& operator *= (const double rhs); 00031 Angle operator * (const double rhs) const; 00032 friend const Angle operator * (const double lhs, const Angle& rhs); 00033 00034 void normalize(void); 00035 00036 00042 int to_deg(void) const; 00043 00044 00050 double to_rad(void) const; 00051 00052 private: 00053 double radian_angle_; 00054 00055 friend Angle rad(double radian); 00056 friend Angle deg(int degree); 00057 }; 00058 00059 00066 extern Angle rad(double radian); 00067 00068 00075 extern Angle deg(int degree); 00076 } 00077 00078 #endif /* !QRK_ANGLE__H */