mirror of https://github.com/tidwall/tile38.git
gofmt -s
This commit is contained in:
parent
6b9468d01b
commit
fa87ff78d7
|
@ -463,12 +463,12 @@ func (c *Controller) parseSetArgs(vs []resp.Value) (d commandDetailsT, fields []
|
|||
}
|
||||
g := geojson.Polygon{
|
||||
Coordinates: [][]geojson.Position{
|
||||
[]geojson.Position{
|
||||
geojson.Position{X: minlon, Y: minlat, Z: 0},
|
||||
geojson.Position{X: minlon, Y: maxlat, Z: 0},
|
||||
geojson.Position{X: maxlon, Y: maxlat, Z: 0},
|
||||
geojson.Position{X: maxlon, Y: minlat, Z: 0},
|
||||
geojson.Position{X: minlon, Y: minlat, Z: 0},
|
||||
{
|
||||
{X: minlon, Y: minlat, Z: 0},
|
||||
{X: minlon, Y: maxlat, Z: 0},
|
||||
{X: maxlon, Y: maxlat, Z: 0},
|
||||
{X: maxlon, Y: minlat, Z: 0},
|
||||
{X: minlon, Y: minlat, Z: 0},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -117,11 +117,11 @@ func (b BBox) union(bbox BBox) BBox {
|
|||
|
||||
func (b BBox) exterior() []Position {
|
||||
return []Position{
|
||||
Position{b.Min.X, b.Min.Y, 0},
|
||||
Position{b.Min.X, b.Max.Y, 0},
|
||||
Position{b.Max.X, b.Max.Y, 0},
|
||||
Position{b.Max.X, b.Min.Y, 0},
|
||||
Position{b.Min.X, b.Min.Y, 0},
|
||||
{b.Min.X, b.Min.Y, 0},
|
||||
{b.Min.X, b.Max.Y, 0},
|
||||
{b.Max.X, b.Max.Y, 0},
|
||||
{b.Max.X, b.Min.Y, 0},
|
||||
{b.Min.X, b.Min.Y, 0},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ func TestCirclePolygon(t *testing.T) {
|
|||
}
|
||||
rect := Polygon{
|
||||
Coordinates: [][]Position{
|
||||
[]Position{
|
||||
{
|
||||
{X: -120, Y: 20, Z: 0},
|
||||
{X: -120, Y: 40, Z: 0},
|
||||
{X: -100, Y: 40, Z: 0},
|
||||
|
|
|
@ -78,13 +78,13 @@ func TestIntersectsShapes(t *testing.T) {
|
|||
|
||||
testIntersectsShapes(t,
|
||||
Polygon{P(0, 0), P(0, 6), P(6, 0), P(0, 0)},
|
||||
[]Polygon{Polygon{P(1, 1), P(1, 2), P(2, 2), P(2, 1), P(1, 1)}},
|
||||
[]Polygon{{P(1, 1), P(1, 2), P(2, 2), P(2, 1), P(1, 1)}},
|
||||
Polygon{P(0.5, 0.5), P(0.5, 4.5), P(4.5, 0.5), P(0.5, 0.5)},
|
||||
true)
|
||||
|
||||
testIntersectsShapes(t,
|
||||
Polygon{P(0, 0), P(0, 10), P(10, 10), P(10, 0), P(0, 0)},
|
||||
[]Polygon{Polygon{P(2, 2), P(2, 6), P(6, 6), P(6, 2), P(2, 2)}},
|
||||
[]Polygon{{P(2, 2), P(2, 6), P(6, 6), P(6, 2), P(2, 2)}},
|
||||
Polygon{P(1, 1), P(1, 9), P(9, 9), P(9, 1), P(1, 1)},
|
||||
true)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue