趣味で作ってるロボット用ソフトウェア
 All Classes Files Functions Enumerations Enumerator Friends Pages
Angle.h
Go to the documentation of this file.
1 #ifndef HRK_ANGLE_H
2 #define HRK_ANGLE_H
3 
10 namespace hrk
11 {
13  class Angle
14  {
15  friend Angle deg(double degree);
16  friend Angle rad(double radian);
17 
18  public:
19  Angle(void);
20 
22  double to_deg(void) const;
23 
25  void set_deg(double degree);
26 
28  double to_rad(void) const;
29 
31  void set_rad(double radian);
32 
34  bool operator != (const Angle& rhs) const;
35  bool operator == (const Angle& rhs) const;
36 
38  Angle& operator += (const Angle& rhs);
39 
41  const Angle operator + (const Angle& rhs) const;
42 
44  Angle& operator -= (const Angle& rhs);
45 
47  const Angle operator - (const Angle& rhs) const;
48 
50  Angle operator - (void) const;
51 
53  Angle& operator *= (const double rhs);
54 
56  Angle operator * (const double rhs) const;
57 
59  friend const Angle operator * (const double lhs, const Angle& rhs);
60 
61  private:
62  double radian_;
63  };
64 
66  extern Angle deg(double degree);
67 
69  extern Angle rad(double radian);
70 }
71 
72 #endif
double to_deg(void) const
dgree 角度を取得する
Definition: Angle.cpp:17
void set_rad(double radian)
radian 角度を登録する
Definition: Angle.cpp:35
Angle & operator*=(const double rhs)
operator
Definition: Angle.cpp:99
Angle operator*(const double rhs) const
operator
Definition: Angle.cpp:106
bool operator!=(const Angle &rhs) const
operator
Definition: Angle.cpp:55
角度
Definition: Angle.h:13
const Angle operator+(const Angle &rhs) const
operator
Definition: Angle.cpp:74
Angle & operator-=(const Angle &rhs)
operator
Definition: Angle.cpp:80
friend Angle deg(double degree)
degree 角度を指定する
Angle operator-(void) const
operator
Definition: Angle.cpp:93
friend Angle rad(double radian)
radian 角度を指定する
void set_deg(double degree)
degree 角度を登録する
Definition: Angle.cpp:23
double to_rad(void) const
radian 角度を取得する
Definition: Angle.cpp:29
Angle & operator+=(const Angle &rhs)
operator
Definition: Angle.cpp:67