-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Returning size() as a usize. Documentation adjustment
- Loading branch information
Showing
3 changed files
with
37 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
# wrapping_coords2d | ||
Rust crate to translate 2D coordinates into a 1D index with wrapping | ||
Rust crate to translate 2D coordinates into a 1D index with wrapping. | ||
|
||
Use WrappingCoords2d to store data from a 2D grid into a 1D container such as `std::vec::Vec`. Both x and y coordinates wrap around through the limits of the grid. WrappingCoords2d is not a container; it is just a tool to manipulate indices. For a 2D container, see [`array2d`](https://docs.rs/array2d/latest/array2d/). For coordinate translation without wrapping, see [`ameda`](https://docs.rs/ameda/latest/ameda). | ||
Use [`WrappingCoords2d`](https://docs.rs/wrapping_coords2d/latest/wrapping_coords2d/struct.WrappingCoords2d.html) to store data from a 2D grid into a 1D container such as `std::vec::Vec`. Both x and y coordinates wrap around the limits of the grid. `WrappingCoords2d` is not a container; it is just a tool to manipulate indices. For a 2D container, see [`array2d`](https://docs.rs/array2d/latest/array2d/). For coordinate translation without wrapping, see [`ameda`](https://docs.rs/ameda/latest/ameda). | ||
|
||
WrappingCoords2d is useful to design cellular automata and agent-based models. You can use WrappingCoords2d as part of an [Entity-Component-System (ECS)](https://en.wikipedia.org/wiki/Entity_component_system) software architecture. See my [ABM project](https://github.com/facorread/rust-agent-based-models) for an example. | ||
`WrappingCoords2d` is useful to design cellular automata and agent-based models. You can use `WrappingCoords2d` as part of an [Entity-Component-System (ECS)](https://en.wikipedia.org/wiki/Entity_component_system) software architecture for high-performing, flexible models. See my [ABM project](https://github.com/facorread/rust-agent-based-models) for an example. | ||
|
||
See some examples in the documentation for the [`wrapping_coords2d`](https://docs.rs/wrapping-coords2d/latest/wrapping-coords2d/) crate. | ||
See more examples in the documentation for the [`wrapping_coords2d`](https://docs.rs/wrapping_coords2d/latest/wrapping_coords2d/) crate. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters