Documentation
¶
Index ¶
- Variables
- type FractionalHex
- type Grid
- func (grid *Grid) HexAt(point Point) Hex
- func (grid *Grid) HexCenter(hex Hex) Point
- func (grid *Grid) HexCorners(hex Hex) [6]Point
- func (grid *Grid) HexFromCode(code int64) Hex
- func (grid *Grid) HexNeighbors(hex Hex, layers int64) []Hex
- func (grid *Grid) HexToCode(hex Hex) int64
- func (grid *Grid) MakeRegion(geometry []Point) *Region
- func (grid *Grid) MakeRegionFromMultiPolygon(geometry [][]Point) *Region
- type Hex
- type Orientation
- type Point
- type Region
Constants ¶
This section is empty.
Variables ¶
View Source
var OrientationFlat = Orientation{ // contains filtered or unexported fields }
View Source
var OrientationPointy = Orientation{ // contains filtered or unexported fields }
Functions ¶
This section is empty.
Types ¶
type FractionalHex ¶
type FractionalHex struct {
// contains filtered or unexported fields
}
func MakeFractionalHex ¶
func MakeFractionalHex(q float64, r float64) FractionalHex
func (FractionalHex) Q ¶
func (fhex FractionalHex) Q() float64
func (FractionalHex) R ¶
func (fhex FractionalHex) R() float64
func (FractionalHex) S ¶
func (fhex FractionalHex) S() float64
func (FractionalHex) ToHex ¶
func (fhex FractionalHex) ToHex() Hex
type Grid ¶
type Grid struct {
// contains filtered or unexported fields
}
func (*Grid) HexCorners ¶
func (*Grid) HexFromCode ¶
func (*Grid) MakeRegion ¶
func (*Grid) MakeRegionFromMultiPolygon ¶
type Orientation ¶
type Orientation struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.