distance

package
v0.3.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Distance

func Distance(p, q Coord) (mi, km float64)

Distance calculates the shortest path between two coordinates on the surface of the Earth. This function returns two units of measure, the first is the distance in miles, the second is the distance in kilometers.

func DistanceMeter

func DistanceMeter(p, q Coord) float64

Types

type Coord

type Coord struct {
	Lat float64
	Lon float64
}

Coord represents a geographic coordinate.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL