GEOS  3.9.1dev
constants.h
Go to the documentation of this file.
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
26 typedef __int64 int64;
27 #endif
28 #endif
29 
30 #include <cmath>
31 #include <limits>
32 #include <cinttypes>
33 
34 
35 typedef int64_t int64;
36 
37 namespace geos {
38 
39 constexpr double MATH_PI = 3.14159265358979323846;
40 
41 
42 
43 // Some handy constants
44 constexpr double DoubleNotANumber = std::numeric_limits<double>::quiet_NaN();
45 constexpr double DoubleMax = (std::numeric_limits<double>::max)();
46 constexpr double DoubleInfinity = (std::numeric_limits<double>::infinity)();
47 constexpr double DoubleNegInfinity = (-(std::numeric_limits<double>::infinity)());
48 
49 } // namespace geos
50 
51 
52 #endif // INCLUDE_GEOS_CONSTANTS_H_
constexpr double MATH_PI
Definition: constants.h:39
constexpr double DoubleNegInfinity
Definition: constants.h:47
constexpr double DoubleInfinity
Definition: constants.h:46
Basic namespace for all GEOS functionalities.
constexpr double DoubleNotANumber
Definition: constants.h:44
constexpr double DoubleMax
Definition: constants.h:45
int64_t int64
Definition: constants.h:35