[][src]Module gridly::direction

A simple enumeration for the 4 cardinal directions.

Re-exports

pub use Direction::*;

Enums

Direction

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

EACH_DIRECTION

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.