midPointCoords static method

Coordinate midPointCoords(
  1. Coordinate p0,
  2. Coordinate p1
)

Computes the midpoint of a segment

@return the midpoint of the segment

Implementation

static Coordinate midPointCoords(Coordinate p0, Coordinate p1) {
  return new Coordinate((p0.x + p1.x) / 2, (p0.y + p1.y) / 2);
}