wasm-spatial-core
    Preparing search index...

    Function bearing

    • Calculate the initial bearing (forward azimuth) from point 1 to point 2.

      Returns the bearing in degrees [0, 360), where 0 = North, 90 = East, 180 = South, 270 = West.

      Arguments

      • lng1: Longitude of origin in degrees.
      • lat1: Latitude of origin in degrees.
      • lng2: Longitude of destination in degrees.
      • lat2: Latitude of destination in degrees.

      Parameters

      • lng1: number
      • lat1: number
      • lng2: number
      • lat2: number

      Returns number