yats.git

ref: 5640e4dfb173199c928e86b0ff0d3f0649be6543

server/geo/distances_test.go


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package geo

import (
	"fmt"
	"testing"
)

func TestDistance(t *testing.T) {

	winnipeg := coordinate{49.895077, -97.138451}
	regina := coordinate{50.445210, -104.618896}

	result := Distance(winnipeg, regina)

	fmt.Printf("%f\n", result)
}

func TestGenerateAllNodes(t *testing.T) {
	for lon := -180; lon <= 180; lon += 10 {
		for lat := -90; lat <= 90; lat += 10 {
			fmt.Printf("Lon: %d Lat: %d\n", lon, lat)
		}
		fmt.Printf("\n")
		//	lon += 10
	}
}