From de1c29b3761c4a91d6b3a4f83b746c7947fb850d Mon Sep 17 00:00:00 2001 From: Arsentiy Milchakov Date: Thu, 6 Apr 2017 20:02:53 +0300 Subject: preparation for std migration --- base/condition.cpp | 3 ++- base/math.hpp | 10 +++++++++- base/timer.cpp | 3 ++- 3 files changed, 13 insertions(+), 3 deletions(-) (limited to 'base') diff --git a/base/condition.cpp b/base/condition.cpp index 2be49f0e27..e2a60f0753 100644 --- a/base/condition.cpp +++ b/base/condition.cpp @@ -2,7 +2,6 @@ #include "base/mutex.hpp" #include "std/target_os.hpp" -#include "std/systime.hpp" #include @@ -10,6 +9,8 @@ #include #include +#include + namespace threads { namespace impl diff --git a/base/math.hpp b/base/math.hpp index c54f74843c..01c31a0c43 100644 --- a/base/math.hpp +++ b/base/math.hpp @@ -11,10 +11,18 @@ #include +namespace math +{ + double constexpr pi = 3.14159265358979323846; + double constexpr pi2 = pi / 2.; + double constexpr pi4 = pi / 4.; + double constexpr twicePi = 2. * pi; + + template T sqr(T t) { return (t*t); } +} namespace my { - template inline T Abs(T x) { return (x < 0 ? -x : x); diff --git a/base/timer.cpp b/base/timer.cpp index 706dde5fcb..cf69719581 100644 --- a/base/timer.cpp +++ b/base/timer.cpp @@ -3,7 +3,6 @@ #include "base/timegm.hpp" #include "base/timer.hpp" -#include "std/systime.hpp" #include "std/target_os.hpp" #include @@ -12,6 +11,8 @@ #include #include +#include + #ifndef OMIM_OS_LINUX using std::get_time; using std::put_time; -- cgit v1.2.3