GEOS 3.11.1
Octant.h
1/**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2006 Refractions Research Inc.
7 *
8 * This is free software; you can redistribute and/or modify it under
9 * the terms of the GNU Lesser General Public Licence as published
10 * by the Free Software Foundation.
11 * See the COPYING file for more information.
12 *
13 **********************************************************************/
14
15#pragma once
16
17#include <geos/export.h>
18
19#include <geos/util.h>
20
21// Forward declarations
22namespace geos {
23namespace geom {
24class Coordinate;
25}
26}
27
28namespace geos {
29namespace noding { // geos.noding
30
47class GEOS_DLL Octant {
48private:
49 Octant() {} // Can't instanciate it
50public:
51
56 static int octant(double dx, double dy);
57
61 static int octant(const geom::Coordinate& p0, const geom::Coordinate& p1);
62
63 static int
64 octant(const geom::Coordinate* p0, const geom::Coordinate* p1)
65 {
66 ::geos::ignore_unused_variable_warning(p0);
67 return octant(*p0, *p1);
68 }
69};
70
71
72} // namespace geos.noding
73} // namespace geos
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:58
Methods for computing and working with octants of the Cartesian plane.
Definition: Octant.h:47
static int octant(const geom::Coordinate &p0, const geom::Coordinate &p1)
static int octant(double dx, double dy)
Basic namespace for all GEOS functionalities.
Definition: geos.h:39