bearingBetween static method

double bearingBetween(
  1. double startLatitude,
  2. double startLongitude,
  3. double endLatitude,
  4. double endLongitude,
)

Calculates the initial bearing between two points

The initial bearing will most of the time be different than the end bearing, see https://www.movable-type.co.uk/scripts/latlong.html#bearing. The supplied coordinates startLatitude, startLongitude, endLatitude and endLongitude should be supplied in degrees.

Implementation

static double bearingBetween(
  double startLatitude,
  double startLongitude,
  double endLatitude,
  double endLongitude,
) =>
    GeolocatorPlatform.instance.bearingBetween(
      startLatitude,
      startLongitude,
      endLatitude,
      endLongitude,
    );