Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-jts committed Dec 20, 2024
1 parent 9133b47 commit b1313ad
Showing 1 changed file with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,16 @@ public static int orientationIndex(Geometry segment, Geometry ptGeom) {
return index;
}

private static int orientationIndex(Coordinate p1, Coordinate p2, Coordinate q)
{
double dx1 = p2.x - p1.x;
double dy1 = p2.y - p1.y;
double dx2 = q.x - p2.x;
double dy2 = q.y - p2.y;
double det = dx1*dy2 - dx2*dy1;
if (det > 0.0) return 1;
if (det < 0.0) return -1;
return 0;
private static int orientationIndex(Coordinate p1, Coordinate p2, Coordinate q) {
double dx1 = p2.x - p1.x;
double dy1 = p2.y - p1.y;
double dx2 = q.x - p2.x;
double dy2 = q.y - p2.y;
double det = dx1 * dy2 - dx2 * dy1;
if (det > 0.0)
return 1;
if (det < 0.0)
return -1;
return 0;
}
}

0 comments on commit b1313ad

Please sign in to comment.