Wrap data for an angle, including the angle in degrees, radians, and the sine and cosine of the angle. This is done for convenience when doing geometric computations that require the use of a lot of trigonometry.
#include <Angle.hpp>
Public Member Functions | |
Angle () | |
Initialize all data to NaN. More... | |
Angle (double s, double c) | |
Angle (double v, AngleType t) | |
std::string | asString () const |
double | deg () const |
Get the angle in degrees. More... | |
Angle | operator+ (const Angle &right) const |
Angle | operator- () const |
Angle | operator- (const Angle &right) const |
double | rad () const |
Get the angle in radians. More... | |
double | semicirc () const |
Get the angle in semi-circles (aka half-cycles). More... | |
void | setValue (double v, AngleType t) |
double | tan () const |
Get the tangent of this angle. More... | |
![]() | |
AngleReduced () | |
Initialize all data to NaN. More... | |
AngleReduced (double s, double c) | |
AngleReduced (double v, AngleType t) | |
std::string | asString () const |
Return a string containing the data separated by commas (sin,cos). More... | |
double | cos () const |
Get the cosine of this angle. More... | |
bool | operator== (const AngleReduced &right) const |
Standard equality operator. More... | |
void | setValue (double v, AngleType t) |
double | sin () const |
Get the sine of this angle. More... | |
Protected Attributes | |
double | degrees |
The angle in degrees. More... | |
double | radians |
The angle in radians. More... | |
double | semicircles |
The angle in semi-circles (aka half-cycles). More... | |
double | tangent |
The tangent of the angle. More... | |
![]() | |
double | cosine |
The cosine of the angle. More... | |
double | sine |
The sine of the angle. More... | |
Private Member Functions | |
Angle (int, int) | |
Angle (long, long) | |
Angle (unsigned long, unsigned long) | |
Angle (unsigned, unsigned) | |
|
explicit |
|
inlineexplicit |
|
explicitprivate |
|
explicitprivate |
|
explicitprivate |
|
explicitprivate |
std::string gnsstk::Angle::asString | ( | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
void gnsstk::Angle::setValue | ( | double | v, |
AngleType | t | ||
) |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |