A Clojure library implementing the algorithms specified in http://www.redblobgames.com/grids/hexagons/.
Feature | Cube | Offset | Axial | Flat | Pointy |
---|---|---|---|---|---|
Angles, size, spacing | ✓ | ✓ | ✓ | ✓ | ✓ |
Coordinate conversions | ✓ | ✓ | |||
Neighbours† | ✓ | ✓ | ✓ | ||
Distances | ✓ | ✓ | ✓ | ||
Range | |||||
Rotation | |||||
Rings & spirals | ✓ | ✓ | |||
Line drawing | ✓ | ✓ | ✓ | ||
Field of View‡ | ✓ | ✓ | |||
Hex to pixel & viceversa | ✓ | ✓ | |||
Pathfinding | ✓ | ✓ | ✓ | ✓ | ✓ |
Wraparound maps |
† No diagonals ‡ Small FOV only
Copyright © 2015 FIXME
Distributed under the Eclipse Public License, the same as Clojure.