Module gridly::direction

source ·
Expand description

A simple enumeration for the 4 cardinal directions.

Re-exports

Enums

  • The four cardinal directions: Up, Down, Left, and Right. Direction implements a number of simple helper methods. It also implements VectorLike, which allows it to be used in contexts where a Vector can be used as a unit vector in the given direction (for example, with Vector arithmetic).

Statics

  • This array contains each direction; it is intended to allow for easy iteration over adjacent locations. The order of the directions is left unspecified and should not be relied upon.