summaryrefslogtreecommitdiffhomepage
path: root/logic
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-09-21 12:01:43 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-09-21 12:01:43 +0200
commit107570e6288d266825724010a6f0149eaaac40db (patch)
treeab357889f6cd009e6e6a89e89657c377d4bb05ab /logic
parent1c22f4a19a0cfa6b593b72754acb9ea97fbded13 (diff)
many: remove compat/pi-constant.hpp
With -D_USE_MATH_DEFINES MSVC defines the standard M_PI and friends. Since this preprocessor definition is now always passed as part of the build system for MSVC. We can use M_PI as if on a mission.
Diffstat (limited to 'logic')
-rw-r--r--logic/simple-mat.cpp1
-rw-r--r--logic/tracker.cpp3
-rw-r--r--logic/tracker.h7
3 files changed, 6 insertions, 5 deletions
diff --git a/logic/simple-mat.cpp b/logic/simple-mat.cpp
index 24a2d69e..57571f9e 100644
--- a/logic/simple-mat.cpp
+++ b/logic/simple-mat.cpp
@@ -1,5 +1,4 @@
#include "simple-mat.hpp"
-#include "compat/pi-constant.hpp"
#include <cmath>
namespace euler {
diff --git a/logic/tracker.cpp b/logic/tracker.cpp
index 3a8df56e..f404e8e0 100644
--- a/logic/tracker.cpp
+++ b/logic/tracker.cpp
@@ -24,6 +24,9 @@
# include <windows.h>
#endif
+constexpr double Tracker::r2d;
+constexpr double Tracker::d2r;
+
Tracker::Tracker(Mappings &m, SelectedLibraries &libs, TrackLogger &logger) :
m(m),
libs(libs),
diff --git a/logic/tracker.h b/logic/tracker.h
index 9c100ea7..1546d910 100644
--- a/logic/tracker.h
+++ b/logic/tracker.h
@@ -10,7 +10,6 @@
#include <vector>
-#include "compat/pi-constant.hpp"
#include "compat/timer.hpp"
#include "api/plugin-support.hpp"
#include "mappings.hpp"
@@ -26,6 +25,7 @@
#include <QThread>
#include <atomic>
+#include <cmath>
#include "export.hpp"
@@ -121,9 +121,8 @@ private:
void t_compensate(const rmat& rmat, const euler_t& ypr, euler_t& output, bool rz);
void run() override;
- static constexpr double pi = OPENTRACK_PI;
- static constexpr double r2d = 180. / OPENTRACK_PI;
- static constexpr double d2r = OPENTRACK_PI / 180.;
+ static constexpr double r2d = 180. / M_PI;
+ static constexpr double d2r = M_PI / 180.;
// note: float exponent base is 2
static constexpr double c_mult = 4;