#include <uangle.h>
get rho. | ||||
Get scale factor rho to convert from the actual unit into the SI-base unit radian. The division of the angle by rho results to the equivalent angle in radian.
| ||||
ecode | _code | |||
code | ||||
double | _rho | |||
scale factor rho | ||||
static const int | _map_size = 8 | |||
map size | ||||
static map_t | _map [] | |||
map | ||||
void | print (ostream &os) const | |||
print map | ||||
static double | rho (int code) | |||
Public Types | ||||
enum | ecode { UNKNOWN, NONE, RADIAN, DEGREE, HOUR, MINUTE, SECOND, GON } | |||
code of unit More... | ||||
Public Member Functions | ||||
set unit using symbol-string. | ||||
| ||||
bool | set (const char *symbol) | |||
UnitAngle () | ||||
default constructor | ||||
constructor using symbol-string. | ||||
| ||||
UnitAngle (const char *symbol) | ||||
virtual | ~UnitAngle () | |||
destructor | ||||
get rho. | ||||
| ||||
double | rho () const | |||
get symbol-string. | ||||
| ||||
const char * | symbol () const | |||
Static Public Member Functions | ||||
get code. | ||||
| ||||
static ecode | code (const char *symbol) | |||
get name. | ||||
| ||||
static const char * | name (int code) | |||
get symbol. | ||||
| ||||
static const char * | symbol (int code) | |||
Classes | ||||
struct | map_t | |||
map structure More... |
Measurements of plane angles. Supported units: radian, decimal degrees, decimal minute, decimal second, hours and gon (grad).
UnitAngle::map_t GenLib2::UnitAngle::_map [static, protected] |
Initial value:
{ { UNKNOWN, "unk", "unkown", 0. }, { NONE, "none", "none", 1. }, { RADIAN, "rad", "radian", 1. }, { DEGREE, "deg", "degree", 180. / M_PI }, { HOUR, "hr", "hour", 12. / M_PI }, { MINUTE, "min", "minute", 180. / M_PI / 60. }, { SECOND, "sec", "second", 180. / M_PI / 3600. }, { GON, "gon", "gon", 200. / M_PI } }
Referenced by print().