diff options
Diffstat (limited to 'Project/DegreesAndRadians.h')
-rw-r--r-- | Project/DegreesAndRadians.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Project/DegreesAndRadians.h b/Project/DegreesAndRadians.h new file mode 100644 index 0000000..a936ed7 --- /dev/null +++ b/Project/DegreesAndRadians.h @@ -0,0 +1,10 @@ +#ifndef DEGREESANDRADIANS_H +#define DEGREESANDRADIANS_H + +#include<wx/math.h> + +// Convert between degrees and radians. +inline double wxDegToRad(double deg) { return (deg * M_PI) / 180.0; } +inline double wxRadToDeg(double rad) { return (rad * 180.0) / M_PI; } + +#endif // DEGREESANDRADIANS_H |