gramods
|
A simple placeholder for angle values expressed in radians. More...
#include <io_angle.hh>
Public Member Functions | |
angle (float v) | |
void | deg (float v) |
Set the angle, in degrees. More... | |
float | deg () |
The angle, in degrees. More... | |
void | rad (float v) |
Set the angle, in radians. More... | |
float | rad () |
The angle, in radians. More... | |
void | operator= (float v) |
Set the value of the angle, in radians. More... | |
operator float () | |
Cast the angle type to float, still in radians. More... | |
Public Attributes | |
float | value |
The angle in radians. More... | |
Static Public Attributes | |
static constexpr float | from_degrees = (float)(GM_PI / 180.0) |
Multiplier to convert from degrees to radians. More... | |
static constexpr float | to_degrees = (float)(180.f / GM_PI) |
Multiplier to convert from radians to degrees. More... | |
A simple placeholder for angle values expressed in radians.
For convenience there are means available for converting to and from degrees, and there is a stream operator defined that allows angles to be expressed in degrees by prepending a 'd', as in d180.
|
inline |
The angle, in degrees.
|
inline |
Set the angle, in degrees.
|
inline |
Cast the angle type to float, still in radians.
|
inline |
Set the value of the angle, in radians.
|
inline |
The angle, in radians.
|
inline |
Set the angle, in radians.
|
staticconstexpr |
Multiplier to convert from degrees to radians.
|
staticconstexpr |
Multiplier to convert from radians to degrees.
float gramods::gmCore::angle::value |
The angle in radians.