bearing

fun bearing(lat1: Double, lon1: Double, lat2: Double, lon2: Double): Double

Computes the bearing in degrees between two points on Earth.

Return

Bearing between the two points in degrees. A value of 0 means due north.

Parameters

lat1

Latitude of the first point

lon1

Longitude of the first point

lat2

Latitude of the second point

lon2

Longitude of the second point