GEOS 3.15.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
25typedef __int64 int64;
26#endif
27#endif
28
29#include <cmath>
30#include <limits>
31#include <cinttypes>
32#include <cstddef> // for std::size_t
33
34namespace geos {
35
36constexpr double MATH_PI = 3.14159265358979323846;
37
38// Some handy constants
39constexpr double DoubleNotANumber = std::numeric_limits<double>::quiet_NaN();
40constexpr double DoubleMax = (std::numeric_limits<double>::max)();
41constexpr double DoubleInfinity = (std::numeric_limits<double>::infinity)();
42constexpr double DoubleNegInfinity = (-(std::numeric_limits<double>::infinity)());
43constexpr double DoubleEpsilon = std::numeric_limits<double>::epsilon();
44
45constexpr std::size_t NO_COORD_INDEX = std::numeric_limits<std::size_t>::max();
46constexpr std::size_t INDEX_UNKNOWN = std::numeric_limits<std::size_t>::max();
47
48} // namespace geos
49
Basic namespace for all GEOS functionalities.
Definition geos.h:38