Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cmath.hpp « std - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0601e73eaaf9b83d2eddd6f37a028d812e254d96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#pragma once

#ifdef new
#undef new
#endif

// We do not define _USE_MATH_DEFINES - please add your constants below.
#include <cmath>

#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif

using std::abs;

namespace math
{
  double constexpr pi = 3.14159265358979323846;
  double constexpr pi2 = pi / 2.;
  double constexpr pi4 = pi / 4.;
  double constexpr twicePi = 2. * pi;

  template <class T> T sqr(T t) { return (t*t); }
}