rust-grid

Crates.iorust-grid
lib.rsrust-grid
version0.1.1
sourcesrc
created_at2021-09-07 17:25:23.626272
updated_at2021-09-07 19:55:21.696984
descriptionVery minimal library to store large grids of any type in memory, with a user-friendly interface
homepagehttps://github.com/wait-what/rust-grid
repositoryhttps://github.com/wait-what/rust-grid
max_upload_size
id448149
size6,770
Wait What (wait-what)

documentation

README

rust-grid

rust-grid is a very minimal library to store large grids of any type in memory, with a user-friendly interface.

Examples

use rust_grid::*;

fn main() {
    let grid: Grid<bool> = Grid::new(10, 15, false);

    // Two ways to access data
    let (x, y) = (3, 4);
    println!("{}", grid[y][x]);
    println!("{}", grid[(x, y)]);

    // Get the size
    let (width, height) = grid.size();
}
Commit count: 2

cargo fmt