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: 8af5e5307a44d96b8b501cc47e3815b34cddd3c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#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

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

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