Skip to content

@ue-too/border / index / midPointOnRhumbLine

関数: midPointOnRhumbLine() ​

midPointOnRhumbLine(startCoord, endCoord): GeoCoord

定義: rhumbLine.ts:179

Calculates the midpoint along a rhumb line.

パラメータ ​

startCoord ​

GeoCoord

The starting geographic coordinate

endCoord ​

GeoCoord

The ending geographic coordinate

戻り値 ​

GeoCoord

The midpoint on the rhumb line path

Remarks ​

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

例 ​

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);