Rust library for optimizing 2D vectors
WARNING: This library is primarily intended for our personal project.
I just want to share it with you so you can test it and, if you like, give me some feedback (or even use it)
install: $ cargo add duble-vec.
documentation on: https://docs.rs/duble-vec/
use duble_vec::*;
fn main() {
let mut vec: DubleVec<i32> = DubleVec::new(Vec2 { x: 6, y: 5 }, 0);
vec.assign(5, Vec2 { x: 1, y: 1 });
if let Some(value) = vec.access(Index { x: 1, y: 1 }) {
println!("Value: {}", value);
} else {
println!("No value at this index");
}
println!("Size: {}", vec.size());
println!("{}", vec;);
}