From a9b804e18c811c781a099a70b960f5bbde61257d Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 18 Jul 2016 12:14:51 +0200 Subject: some: replace hardcoded pi values with the same pi constant We can't depend on M_PI existing after including cmath. --- tracker-rift-025/ftnoir_tracker_rift_025.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'tracker-rift-025') diff --git a/tracker-rift-025/ftnoir_tracker_rift_025.cpp b/tracker-rift-025/ftnoir_tracker_rift_025.cpp index aab8d530..d39599a9 100644 --- a/tracker-rift-025/ftnoir_tracker_rift_025.cpp +++ b/tracker-rift-025/ftnoir_tracker_rift_025.cpp @@ -2,12 +2,10 @@ #include "ftnoir_tracker_rift_025.h" #include "opentrack/plugin-api.hpp" #include "OVR.h" +#include "opentrack-compat/pi-constant.hpp" #include #include -#ifndef M_PI -# define M_PI 3.14159265358979323846 -#endif using namespace OVR; @@ -87,7 +85,7 @@ void Rift_Tracker::data(double *data) old_yaw = yaw_; } - static constexpr double r2d = 180 / M_PI; + static constexpr double r2d = 180 / OPENTRACK_PI; data[Yaw] = yaw_ * r2d; data[Pitch] = double(pitch) * r2d; -- cgit v1.2.3