orientationIndex static method

int orientationIndex(
  1. Coordinate p1,
  2. Coordinate p2,
  3. Coordinate q
)

Implementation

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;
  return signOfDet2x2(dx1, dy1, dx2, dy2);
}