This class provides an angle between 0 and radians. All operations on the value of the angle are adjusted so that the value is always in the correct range.
Definition at line 45 of file Angle.H.
Public Member Functions | |
Angle () | |
Standard constructor. | |
Angle (const double value) | |
Standard constructor. | |
Angle (const Angle &angle) | |
Copy constructor. | |
~Angle () | |
Standard destructor. | |
Operators | |
Angle & | operator= (const Angle &angle) |
Assignment operator. | |
Angle & | operator= (const double value) |
Assignment operator. | |
Angle & | operator+= (const double value) |
Add to the angle. | |
Angle & | operator-= (const double value) |
Subtract from the angle. | |
Angle & | operator *= (const double value) |
Multiply the angle. | |
Angle & | operator/= (const double value) |
Divide the angle. | |
Accessing the angle value | |
operator double () const | |
Access the value in radians. | |
double | degrees () const |
Access the value in degrees. | |
Private Member Functions | |
void | clip () |
Private Attributes | |
double | m_value |
Friends | |
std::istream & | operator>> (std::istream &in, Angle &angle) |
Standard input stream operator. |
Angle | ( | const double | value | ) | [inline] |
Angle& operator= | ( | const double | value | ) | [inline] |
Angle& operator+= | ( | const double | value | ) | [inline] |
Angle& operator-= | ( | const double | value | ) | [inline] |
Angle& operator *= | ( | const double | value | ) | [inline] |
Angle& operator/= | ( | const double | value | ) | [inline] |
operator double | ( | ) | const [inline] |
double degrees | ( | ) | const [inline] |
void clip | ( | ) | [inline, private] |
Definition at line 105 of file Angle.H.
References m_value.
Referenced by Angle(), operator *=(), operator+=(), operator-=(), operator/=(), and operator=().
std::istream& operator>> | ( | std::istream & | in, | |
Angle & | angle | |||
) | [friend] |
double m_value [private] |
Definition at line 103 of file Angle.H.
Referenced by clip(), degrees(), operator *=(), operator double(), operator+=(), operator-=(), operator/=(), and operator=().