GEOS  3.13.0dev
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 #pragma once
21 
22 #ifdef _MSC_VER
23 #ifndef NOMINMAX
24 #define NOMINMAX 1
25 typedef __int64 int64;
26 #endif
27 #endif
28 
29 #include <cmath>
30 #include <limits>
31 #include <cinttypes>
32 
33 namespace geos {
34 
35 constexpr double MATH_PI = 3.14159265358979323846;
36 
37 // Some handy constants
38 constexpr double DoubleNotANumber = std::numeric_limits<double>::quiet_NaN();
39 constexpr double DoubleMax = (std::numeric_limits<double>::max)();
40 constexpr double DoubleInfinity = (std::numeric_limits<double>::infinity)();
41 constexpr double DoubleNegInfinity = (-(std::numeric_limits<double>::infinity)());
42 constexpr double DoubleEpsilon = std::numeric_limits<double>::epsilon();
43 
44 constexpr std::size_t NO_COORD_INDEX = std::numeric_limits<std::size_t>::max();
45 
46 } // namespace geos
47 
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25