Пример #1
0
func TestCoordsJoined(t *testing.T) {
	assert.Panics(t, func() {
		geom.NewCoordsJoined(coords64.NewCoords64WithDimensions(2), coords64.NewCoords64WithDimensions(3))
	}, "All functions should have same number of dimensions")
	assert.Panics(t, func() {
		geom.NewCoordsJoined()
	}, "There should be at least on Coords object in the Joined Coords")
}
Пример #2
0
func coordsJoined3D(values []float64) geom.Coords {
	if len(values) < 3 {
		return coords64.NewCoords64WithDimensions(3)
	}
	c1 := coords64.NewCoords64FromSlice(3, values[:3])
	c2 := coords64.NewCoords64FromSlice(3, values[3:])
	return geom.NewCoordsJoined(c1, c2)
}