19 #ifndef GEOS_NODING_SEGMENTPOINTCOMPARATOR_H 20 #define GEOS_NODING_SEGMENTPOINTCOMPARATOR_H 22 #include <geos/export.h> 23 #include <geos/geom/Coordinate.h> 60 int xSign = relativeSign(p0.
x, p1.
x);
61 int ySign = relativeSign(p0.
y, p1.
y);
65 return compareValue(xSign, ySign);
67 return compareValue(ySign, xSign);
69 return compareValue(ySign, -xSign);
71 return compareValue(-xSign, ySign);
73 return compareValue(-xSign, -ySign);
75 return compareValue(-ySign, -xSign);
77 return compareValue(-ySign, xSign);
79 return compareValue(xSign, -ySign);
87 relativeSign(
double x0,
double x1)
99 compareValue(
int compareSign0,
int compareSign1)
101 if(compareSign0 < 0) {
104 if(compareSign0 > 0) {
107 if(compareSign1 < 0) {
110 if(compareSign1 > 0) {
121 #endif // GEOS_NODING_SEGMENTPOINTCOMPARATOR_H double y
y-coordinate
Definition: Coordinate.h:83
static int compare(int octant, const geom::Coordinate &p0, const geom::Coordinate &p1)
Definition: SegmentPointComparator.h:52
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
double x
x-coordinate
Definition: Coordinate.h:80
Definition: SegmentPointComparator.h:39