21#include <geos/export.h>
22#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) {
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:58
double y
y-coordinate
Definition: Coordinate.h:81
double x
x-coordinate
Definition: Coordinate.h:78
Implements a robust method of comparing the relative position of two points along the same segment.
Definition: SegmentPointComparator.h:39
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.
Definition: SegmentPointComparator.h:52
Basic namespace for all GEOS functionalities.
Definition: geos.h:39