Skip to content

Reference

tilttek/grid

Every public type of the package, with its role.

TypeRole
Square\CellA cell of a square or isometric grid, its neighbours and its turns
Square\DiagonalRuleHow a diagonal step counts: orthogonal, 5-5-5, 5-10-5, Euclidean
Square\MovementDistances, lines, areas, rings and fields of view on squares, under a rule
Square\SquareGridSquare cells on an image: cell under a position, centre, snapping, alignment
Isometric\IsometricGridDiamond cells on an image: cell under a position, centre, snapping
Hex\AxialA hexagon in axial coordinates: distances, neighbours, lines, areas, rings, fields of view, turns
Hex\CubeA hexagon in cube coordinates, and the hexagon nearest a fractional position
Hex\OffsetA hexagon in offset coordinates, column and row
Hex\OffsetLayoutWhich rows or columns are pushed: odd-r, even-r, odd-q, even-q
Hex\OrientationHexagons with a point or a flat side up
Hex\HexGridHexagons on an image: hexagon under a position, centre, snapping, alignment
GridlessDistances on a map without a grid, in its own units
GridKindThe grid of a map, as stored beside it
MapHintsThe pixels per cell, columns and rows read from a file name
PointA position on an image, exact
RatioAn exact fraction, its arithmetic and its rounding
LimitsThe bounds of every computation
Exception\GridException and its two exceptionsExceptions