summaryrefslogtreecommitdiffhomepage
path: root/proto-ft
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-07-18 12:14:51 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-07-19 07:17:22 +0200
commita9b804e18c811c781a099a70b960f5bbde61257d (patch)
tree069a7de35557f4d9ff141d795d287e4ac128f625 /proto-ft
parent9fc8ebfd8ab54b9fe1caaf60147dd43a573d67ef (diff)
some: replace hardcoded pi values with the same pi constant
We can't depend on M_PI existing after including cmath.
Diffstat (limited to 'proto-ft')
-rw-r--r--proto-ft/ftnoir_protocol_ft.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/proto-ft/ftnoir_protocol_ft.cpp b/proto-ft/ftnoir_protocol_ft.cpp
index d0e89753..fe96db93 100644
--- a/proto-ft/ftnoir_protocol_ft.cpp
+++ b/proto-ft/ftnoir_protocol_ft.cpp
@@ -9,6 +9,7 @@
#include "ftnoir_protocol_ft.h"
#include "csv/csv.h"
#include "opentrack-library-path.h"
+#include "opentrack-compat/pi-constant.hpp"
check_for_first_run FTNoIR_Protocol::runonce_check = check_for_first_run();
@@ -96,7 +97,7 @@ void FTNoIR_Protocol::pose(const double* headpose)
float FTNoIR_Protocol::degrees_to_rads(double degrees)
{
- static constexpr double pi = 3.14159265358979323846;
+ static constexpr double pi = OPENTRACK_PI;
return float(degrees*pi/180);
}