GEOS  3.14.0dev
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
22 namespace geos {
23 namespace geom {
24 class CoordinateXY;
25 }
26 }
27 
28 namespace geos {
29 namespace noding { // geos.noding
30 
47 class GEOS_DLL Octant {
48 private:
49  Octant() {} // Can't instantiate it
50 public:
51 
56  static int octant(double dx, double dy);
57 
61  static int octant(const geom::CoordinateXY& p0, const geom::CoordinateXY& p1);
62 
63  static int
64  octant(const geom::CoordinateXY* p0, const geom::CoordinateXY* 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
Methods for computing and working with octants of the Cartesian plane.
Definition: Octant.h:47
static int octant(double dx, double dy)
static int octant(const geom::CoordinateXY &p0, const geom::CoordinateXY &p1)
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25