summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt/ftnoir_tracker_pt.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-09-21 12:01:43 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-09-21 12:01:43 +0200
commit107570e6288d266825724010a6f0149eaaac40db (patch)
treeab357889f6cd009e6e6a89e89657c377d4bb05ab /tracker-pt/ftnoir_tracker_pt.cpp
parent1c22f4a19a0cfa6b593b72754acb9ea97fbded13 (diff)
many: remove compat/pi-constant.hpp
With -D_USE_MATH_DEFINES MSVC defines the standard M_PI and friends. Since this preprocessor definition is now always passed as part of the build system for MSVC. We can use M_PI as if on a mission.
Diffstat (limited to 'tracker-pt/ftnoir_tracker_pt.cpp')
-rw-r--r--tracker-pt/ftnoir_tracker_pt.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/tracker-pt/ftnoir_tracker_pt.cpp b/tracker-pt/ftnoir_tracker_pt.cpp
index 20327020..ce19d592 100644
--- a/tracker-pt/ftnoir_tracker_pt.cpp
+++ b/tracker-pt/ftnoir_tracker_pt.cpp
@@ -18,8 +18,6 @@
//#define PT_PERF_LOG //log performance
-constexpr f Tracker_PT::pi;
-
//-----------------------------------------------------------------------------
Tracker_PT::Tracker_PT() :
video_widget(nullptr),
@@ -72,7 +70,7 @@ bool Tracker_PT::get_focal_length(f& ret)
const int w = info.res_x, h = info.res_y;
const double diag = sqrt(1. + h/(double)w * h/(double)w);
- const double diag_fov = static_cast<int>(s.fov) * pi / 180.;
+ const double diag_fov = static_cast<int>(s.fov) * M_PI / 180.;
const double fov = 2.*atan(tan(diag_fov/2.0)/diag);
ret = .5 / tan(.5 * fov);
return true;