Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GeoStorage ¶
type GeoStorage struct {
// contains filtered or unexported fields
}
GeoStorage is a wrapper to add points based on lat/lon
func New ¶
func New(latitude float64, longitude float64, store *Interface) GeoStorage
New creates a new GeoStorage centered around latitutude, longitude
func (*GeoStorage) AxialFromGeo ¶
func (g *GeoStorage) AxialFromGeo(latitude, longitude float64) coordinate.Axial
AxialFromGeo gets an Axial coordinate from the difference the lat,lon center and the arg.
type Interface ¶
type Interface interface { Get(coordinate.Interface) (interface{}, bool) Set(coordinate.Interface, interface{}) //LinearInterpolation(coordinate.Interface) []coordinate.Interface Neighbors(coordinate.Interface) []coordinate.Interface }
Interface defines the minimum information needed to be useful
type SimpleMap ¶
type SimpleMap map[coordinate.Interface]interface{}
SimpleMap is a hashmap representation of a hexagonal grid
func (SimpleMap) Get ¶
func (s SimpleMap) Get(key coordinate.Interface) (interface{}, bool)
Get returns a the key associated with a coordinate, or the
func (SimpleMap) Neighbors ¶
func (s SimpleMap) Neighbors(key coordinate.Interface) []coordinate.Interface
Neighbors returns the valid neighbors in a map
func (SimpleMap) Set ¶
func (s SimpleMap) Set(key coordinate.Interface, value interface{})
Set associates a value with a coordinate
Click to show internal directories.
Click to hide internal directories.