Jamoma API  0.6.0.a19
Angle.h
1 // Angle.h
2 /***************************************************/
3 /*! \class Angle
4  \brief Angle class
5 
6  This class implements an angle, which is given values
7  in degrees but converts and stores them as radians.
8 
9  by Tristan Matthews and Nils Peters, 2007-2008.
10  */
11 /***************************************************/
12 
13 #ifndef _ANGLE_H_
14 #define _ANGLE_H_
15 
16 #include "ext.h"
17 
18 class Angle {
19  private:
20  double min_;
21  double max_;
22  double max2_;
23  double coord_;
24  public:
25  //! Default class constructor.
26  Angle();
27  //! Class constructor, taking an angle in degrees, a lower bound, an upper bound and another upper bound.
28  Angle(double nCoord, double min, double max, double max2);
29 
30  //! Get angle.
31  double operator ()() const;
32  //! Set angle.
33  void operator () (double nCoord);
34 
35  //! Constant to convert degrees to radians.
36  static const double PI_X_180;
37 
38  //! Class destructor.
39  ~Angle() {};
40 };
41 
42 #endif
43 // vim:sw=4:et:cindent:
Angle()
Default class constructor.
Definition: Angle.cpp:21
static const double PI_X_180
Constant to convert degrees to radians.
Definition: Angle.h:36
~Angle()
Class destructor.
Definition: Angle.h:39
double operator()() const
Get angle.
Definition: Angle.cpp:61
Angle class.
Definition: Angle.h:18