diff options
author | Michael Muré <batolettre@gmail.com> | 2020-02-05 22:03:19 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2020-02-05 22:33:03 +0100 |
commit | 1d4bb7ceb0cef79d68df0bacc913b01e40e6ddd6 (patch) | |
tree | e088b0fa43058afde1db71541d8fcb4b94905d6e /vendor/github.com/icrowley/fake/geo.go | |
parent | f093be96e98284580d61664adecd0a2ff8b354e4 (diff) | |
download | git-bug-1d4bb7ceb0cef79d68df0bacc913b01e40e6ddd6.tar.gz |
migrate to go modules
Diffstat (limited to 'vendor/github.com/icrowley/fake/geo.go')
-rw-r--r-- | vendor/github.com/icrowley/fake/geo.go | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/vendor/github.com/icrowley/fake/geo.go b/vendor/github.com/icrowley/fake/geo.go deleted file mode 100644 index 12625b93..00000000 --- a/vendor/github.com/icrowley/fake/geo.go +++ /dev/null @@ -1,57 +0,0 @@ -package fake - -// Latitude generates latitude (from -90.0 to 90.0) -func Latitude() float32 { - return r.Float32()*180 - 90 -} - -// LatitudeDegrees generates latitude degrees (from -90 to 90) -func LatitudeDegrees() int { - return r.Intn(180) - 90 -} - -// LatitudeMinutes generates latitude minutes (from 0 to 60) -func LatitudeMinutes() int { - return r.Intn(60) -} - -// LatitudeSeconds generates latitude seconds (from 0 to 60) -func LatitudeSeconds() int { - return r.Intn(60) -} - -// LatitudeDirection generates latitude direction (N(orth) o S(outh)) -func LatitudeDirection() string { - if r.Intn(2) == 0 { - return "N" - } - return "S" -} - -// Longitude generates longitude (from -180 to 180) -func Longitude() float32 { - return r.Float32()*360 - 180 -} - -// LongitudeDegrees generates longitude degrees (from -180 to 180) -func LongitudeDegrees() int { - return r.Intn(360) - 180 -} - -// LongitudeMinutes generates (from 0 to 60) -func LongitudeMinutes() int { - return r.Intn(60) -} - -// LongitudeSeconds generates (from 0 to 60) -func LongitudeSeconds() int { - return r.Intn(60) -} - -// LongitudeDirection generates (W(est) or E(ast)) -func LongitudeDirection() string { - if r.Intn(2) == 0 { - return "W" - } - return "E" -} |