Skip to content

@ue-too/border / midPointOnRhumbLine

Function: midPointOnRhumbLine()

midPointOnRhumbLine(startCoord, endCoord): GeoCoord

Defined in: rhumbLine.ts:179

Calculates the midpoint along a rhumb line.

Parameters

startCoord

GeoCoord

The starting geographic coordinate

endCoord

GeoCoord

The ending geographic coordinate

Returns

GeoCoord

The midpoint on the rhumb line path

Remarks

Finds the point exactly halfway along a rhumb line path between two points.

Example

typescript
const start = { latitude: 50.0, longitude: -5.0 };
const end = { latitude: 58.0, longitude: 3.0 };

const mid = midPointOnRhumbLine(start, end);
console.log('Midpoint:', mid);