GEOS 3.8.1
constants.h
1/**********************************************************************
2 *
3 * constants.h
4 *
5 * GEOS - Geometry Engine Open Source
6 * http://geos.osgeo.org
7 *
8 * Copyright (C) 2018 Vicky Vergara
9 * Copyright (C) 2009 Mateusz Loskot
10 * Copyright (C) 2005-2009 Refractions Research Inc.
11 * Copyright (C) 2001-2009 Vivid Solutions Inc.
12 *
13 * This is free software; you can redistribute and/or modify it under
14 * the terms of the GNU Lesser General Public Licence as published
15 * by the Free Software Foundation.
16 * See the COPYING file for more information.
17 *
18 *********************************************************************/
19
20#ifndef INCLUDE_GEOS_CONSTANTS_H_
21#define INCLUDE_GEOS_CONSTANTS_H_
22
23#ifdef _MSC_VER
24#ifndef NOMINMAX
25#define NOMINMAX 1
26typedef __int64 int64;
27#endif
28#endif
29
30#include <cmath>
31#include <limits>
32#include <cinttypes>
33
34
35#ifdef M_PI
36#undef M_PI
37#endif
38typedef int64_t int64;
39
40namespace geos {
41
42constexpr double M_PI = 3.14159265358979323846;
43
44
45
46// Some handy constants
47constexpr double DoubleNotANumber = std::numeric_limits<double>::quiet_NaN();
48constexpr double DoubleMax = (std::numeric_limits<double>::max)();
49constexpr double DoubleInfinity = (std::numeric_limits<double>::infinity)();
50constexpr double DoubleNegInfinity = (-(std::numeric_limits<double>::infinity)());
51
52} // namespace geos
53
54
55#endif // INCLUDE_GEOS_CONSTANTS_H_
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25