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. --- proto-ft/ftnoir_protocol_ft.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'proto-ft') 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); } -- cgit v1.2.3