19 #ifndef GEOS_NODING_SEGMENTPOINTCOMPARATOR_H 20 #define GEOS_NODING_SEGMENTPOINTCOMPARATOR_H 61 int xSign = relativeSign(p0.
x, p1.
x);
62 int ySign = relativeSign(p0.
y, p1.
y);
66 return compareValue(xSign, ySign);
68 return compareValue(ySign, xSign);
70 return compareValue(ySign, -xSign);
72 return compareValue(-xSign, ySign);
74 return compareValue(-xSign, -ySign);
76 return compareValue(-ySign, -xSign);
78 return compareValue(-ySign, xSign);
80 return compareValue(xSign, -ySign);
102 if(compareSign0 < 0) {
105 if(compareSign0 > 0) {
108 if(compareSign1 < 0) {
111 if(compareSign1 > 0) {
122 #endif // GEOS_NODING_SEGMENTPOINTCOMPARATOR_H
static int compare(int octant, const geom::Coordinate &p0, const geom::Coordinate &p1)
Compares two Coordinates for their relative position along a segment lying in the specified Octant...
Coordinate is the lightweight class used to store coordinates.
Basic namespace for all GEOS functionalities.
static int relativeSign(double x0, double x1)
bool equals2D(const Coordinate &other) const
Implements a robust method of comparing the relative position of two points along the same segment...
static int compareValue(int compareSign0, int compareSign1)