Expand description
Another Grid Library Except Terrible
This is a successor to my old crate cogs_gamedev’s grids module.
It adds opinionated integer-based coordinates and directions, along with some other useful things:
- Iterators over areas, edges of areas, and lines
Grid<T>, which is like aHashMap<Coord, T>but faster
This crate is built alongside and for my W.I.P. roguelike Foxfire.
Structs
Unsigned-int coordinates
Signed-int coordinates
Iterates over coordinates on a line using Bresenham’s algorith,.
Enums
Four-way directions.
Eight-way directions.
Nine-way directions: 8 compass points plus center.
Where to stop the iteration of the line.
2-way rotations: clockwise or counterclockwise. These don’t indicate any specific angle by themselves, only in relation to something.