Trait bracket_algorithm_traits::prelude::Algorithm2D [−][src]
Implement these for handling conversion to/from 2D coordinates (they are separate, because you might want Dwarf Fortress style 3D!)
Provided methods
fn point2d_to_index(&self, pt: Point) -> usize
[src]
Convert a Point (x/y) to an array index. Defaults to an index based on an array strided X first.
fn index_to_point2d(&self, idx: usize) -> Point
[src]
Convert an array index to a point. Defaults to an index based on an array strided X first.
fn dimensions(&self) -> Point
[src]
Retrieve the map's dimensions. Made optional to reduce API breakage.