midpoint

fun midpoint(point1: Position, point2: Position): Position

Takes two Positions and returns a point midway between them. The midpoint is calculated geodesically, meaning the curvature of the earth is taken into account.

Return

A Position midway between point1 and point2

Parameters

point1

the first point

point2

the second point