summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt/ftnoir_tracker_pt.h
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 /tracker-pt/ftnoir_tracker_pt.h
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 'tracker-pt/ftnoir_tracker_pt.h')
-rw-r--r--tracker-pt/ftnoir_tracker_pt.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/tracker-pt/ftnoir_tracker_pt.h b/tracker-pt/ftnoir_tracker_pt.h
index 40f9ad4a..d2f69ac2 100644
--- a/tracker-pt/ftnoir_tracker_pt.h
+++ b/tracker-pt/ftnoir_tracker_pt.h
@@ -17,6 +17,7 @@
#include "pt_video_widget.h"
#include "opentrack-compat/timer.hpp"
#include "opentrack/opencv-camera-dialog.hpp"
+#include "opentrack-compat/pi-constant.hpp"
#include <QThread>
#include <QMutex>
@@ -32,7 +33,7 @@ class TrackerDialog_PT;
// Constantly processes the tracking chain in a separate thread
class Tracker_PT : public QThread, public ITracker, private pt_types
{
- static constexpr double pi = 3.14159265359;
+ static constexpr double pi = OPENTRACK_PI;
Q_OBJECT
friend class camera_dialog;
@@ -76,8 +77,8 @@ private:
volatile bool ever_success;
volatile unsigned char commands;
- static constexpr f rad2deg = f(180/3.14159265);
- //static constexpr float deg2rad = float(3.14159265/180);
+ static constexpr f rad2deg = f(180/OPENTRACK_PI);
+ //static constexpr float deg2rad = float(OPENTRACK_PI/180);
};
class TrackerDll : public Metadata