summaryrefslogtreecommitdiffstats
path: root/Project/DegreesAndRadians.h
diff options
context:
space:
mode:
authorThales Lima Oliveira <thaleslima.ufu@gmail.com>2017-05-08 12:36:53 -0300
committerGitHub <noreply@github.com>2017-05-08 12:36:53 -0300
commitfe4776d88169c048e06c142d81bfd42651c63d1d (patch)
treed6fc2b0074a9879e01e776f04fe848bb4ae78f98 /Project/DegreesAndRadians.h
parent7ade1da522d642fa5f7a38e62d0e865733ef1afe (diff)
parent83aac18c1f8979fc9577fe23ad1522a3a6643940 (diff)
downloadPSP.git-fe4776d88169c048e06c142d81bfd42651c63d1d.tar.gz
PSP.git-fe4776d88169c048e06c142d81bfd42651c63d1d.tar.xz
PSP.git-fe4776d88169c048e06c142d81bfd42651c63d1d.zip
Merge pull request #31 from ronignc/master
Added DegreesAndRadians.h and included conditional compilation in some files
Diffstat (limited to 'Project/DegreesAndRadians.h')
-rw-r--r--Project/DegreesAndRadians.h10
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