Expand description
Types and methods for working with a hexagon grid.
Much inspiration has been taken from the great Hexagonal Grids overview by Red Blob Games.
Structs§
- Coordinate within a hexagon grid.
- Floating-point variant of a grid
Coordinate
. - Floating-point variant of a hexagon
Direction
. - Coefficients for converting between hexagonal grid coordinates and x/y pixels. Used as parameter for different conversion functions.
- Hexagon orientation coefficients.
- Position within a grid of rectangular pixels.
- Rectangle area within a grid of rectangular pixels. It consists of the four values: top, left, width, and height. Both axes of the grid are aligned like the coordinate system of a web page:
x
runs from left to right,y
runs from top to bottom.
Enums§
- Direction within a hexagon grid.