GEOS 3.9.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
35typedef int64_t int64;
36
37namespace geos {
38
39constexpr double MATH_PI = 3.14159265358979323846;
40
41
42
43// Some handy constants
44constexpr double DoubleNotANumber = std::numeric_limits<double>::quiet_NaN();
45constexpr double DoubleMax = (std::numeric_limits<double>::max)();
46constexpr double DoubleInfinity = (std::numeric_limits<double>::infinity)();
47constexpr double DoubleNegInfinity = (-(std::numeric_limits<double>::infinity)());
48
49} // namespace geos
50
51
52#endif // INCLUDE_GEOS_CONSTANTS_H_
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:26