Beispiel #1
0
//  Get a list of unique vertices adjacent to (u,v,k).
//  See also, (Vertex) Identical.
func (vert Vertex) Adjacents() []Vertex {
	var identVerts = vert.IdenticalVertices()
	var adjVerts = make([]Vertex, len(identVerts))
	for i, vert := range identVerts {
		adjVerts[i] = Vertex{vert.U, vert.V, hex.VertexIndexClockwise(vert.K)}
	}
	return adjVerts
}
Beispiel #2
0
func (vc Vertex) Clockwise() Vertex {
	return Vertex{vc.U, vc.V, hex.VertexIndexClockwise(vc.K)}
}