MCPcopy
hub / github.com/golang/geo / LatLngFromDegrees

Function LatLngFromDegrees

s2/latlng.go:36–38  ·  view source on GitHub ↗

LatLngFromDegrees returns a LatLng for the coordinates given in degrees.

(lat, lng float64)

Source from the content-addressed store, hash-verified

34
35// LatLngFromDegrees returns a LatLng for the coordinates given in degrees.
36func LatLngFromDegrees(lat, lng float64) LatLng {
37 return LatLng{s1.Angle(lat) * s1.Degree, s1.Angle(lng) * s1.Degree}
38}
39
40// IsValid returns true iff the LatLng is normalized, with Lat ∈ [-π/2,π/2] and Lng ∈ [-π,π].
41func (ll LatLng) IsValid() bool {

Calls 1

AngleTypeAlias · 0.92

Used in the wild real call sites across dependent graphs

searching dependent graphs…