23#include <geos/export.h>
24#include <geos/geom/Quadrant.h>
25#include <geos/geom/Coordinate.h>
26#include <geos/util/IllegalArgumentException.h>
56 static const int NE = 0;
57 static const int NW = 1;
58 static const int SW = 2;
59 static const int SE = 3;
69 if(dx == 0.0 && dy == 0.0) {
71 s <<
"Cannot compute the quadrant for point ";
72 s <<
"(" << dx <<
"," << dy <<
")" << std::endl;
100 if(p1.
x == p0.
x && p1.
y == p0.
y) {
130 int diff = (quad1 - quad2 + 4) % 4;
144 static int commonHalfPlane(
int quad1,
int quad2);
157 return quad == NE || quad == NW;
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:58
std::string toString() const
Returns a string of the form (x,y,z) .
double y
y-coordinate
Definition: Coordinate.h:81
double x
x-coordinate
Definition: Coordinate.h:78
Utility functions for working with quadrants.
Definition: Quadrant.h:52
static int quadrant(double dx, double dy)
Definition: Quadrant.h:67
static bool isOpposite(int quad1, int quad2)
Definition: Quadrant.h:125
static bool isInHalfPlane(int quad, int halfPlane)
static bool isNorthern(int quad)
Definition: Quadrant.h:155
static int quadrant(const geom::Coordinate &p0, const geom::Coordinate &p1)
Definition: Quadrant.h:98
Indicates one or more illegal arguments.
Definition: IllegalArgumentException.h:33
Basic namespace for all GEOS functionalities.
Definition: geos.h:39