[][src]Type Definition semeion::space::Offset

type Offset = Point<i32>;

Represents an offset from an Entity location within the environment.

Implementations

impl Offset[src]

pub fn border(scope: impl Into<Scope>) -> Vec<Offset>[src]

Gets a list of offsets from a central location in a grid, to all the tiles located in its border, according to the given distance between the tile in the center and the border (Scope), in arbitrary order. Returns a single Offset equal to the origin (0, 0) if the given Scope is equal to 0.

pub fn corners(scope: impl Into<Scope>) -> [Offset; 4][src]

Gets a list of offsets from a central location in a grid, to all the 4 tiles located in the corners of its border, according to the given distance between the tile in the center and the border (Scope), in arbitrary order.