summaryrefslogtreecommitdiffhomepage
path: root/tracker-rift-080
diff options
context:
space:
mode:
Diffstat (limited to 'tracker-rift-080')
-rw-r--r--tracker-rift-080/ftnoir_tracker_rift_080.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/tracker-rift-080/ftnoir_tracker_rift_080.cpp b/tracker-rift-080/ftnoir_tracker_rift_080.cpp
index c1a07407..94c8dc41 100644
--- a/tracker-rift-080/ftnoir_tracker_rift_080.cpp
+++ b/tracker-rift-080/ftnoir_tracker_rift_080.cpp
@@ -4,12 +4,9 @@
#include "OVR_CAPI.h"
#include "Extras/OVR_Math.h"
#include "OVR_CAPI_0_8_0.h"
+#include "opentrack-compat/pi-constant.hpp"
#include <cstdio>
-#ifndef M_PI
-# define M_PI 3.14159265358979323846
-#endif
-
using namespace OVR;
Rift_Tracker::Rift_Tracker() : old_yaw(0), hmd(nullptr)
@@ -63,7 +60,7 @@ void Rift_Tracker::data(double *data)
yaw_ += s.constant_drift;
old_yaw = yaw_;
}
- static constexpr double d2r = 180 / M_PI;
+ static constexpr double d2r = 180 / OPENTRACK_PI;
data[Yaw] = yaw_ * -d2r;
data[Pitch] = double(pitch) * d2r;
data[Roll] = double(roll) * d2r;