[−][src]Crate gridd
A generic, dirt-simple, two-dimensional grid.
Coordinates
Grid entries are accessed with the Coord
type, which is of the form
(column, row), where column >= 0 and row >= 0.
Vectors
Instead of offering pre-defined relational getters/iterators such as
neighbors
or diagonals
, Gridd provides Vector
s for users to build
their own spatial relationship methods. Vector
s are just struct
s with
positive or negative col_offset
and row_offset
fields, enabling the
codification of arbitrary relations.
Scalar multiplication is reflexively defined on Vectors
for i32
values and addition/subtraction is defined between vectors, each in the
traditional manner.
Static Grids
Currently, Gridd only supports grids of a fixed size.
Structs
StaticGrid | Two-dimensional, non-resizeable, zero-indexed grid. |
Vector | A two-dimensional vector used to relate grid elements spatially. |
Type Definitions
Coord | Coordinates of the form (column, row), where column >= 0 and row >= 0. |