midpointRaw function

Position midpointRaw(
  1. Position point1,
  2. Position point2
)

Implementation

Position midpointRaw(Position point1, Position point2) {
  var dist = distanceRaw(point1, point2);
  var heading = bearingRaw(point1, point2);
  var midpoint = destinationRaw(point1, dist / 2, heading);

  return midpoint;
}