Skip to content

Commit

Permalink
Rephrased documentation. Needs a version bump.
Browse files Browse the repository at this point in the history
  • Loading branch information
facorread committed Feb 15, 2020
1 parent 2af0cc5 commit bc8ee86
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wrapping_coords2d"
version = "0.1.1" # remember to update html_root_url
version = "0.1.2" # remember to update html_root_url
authors = ["Fabio A. Correa Duran <facorread@gmail.com>"]
categories = ["caching", "memory-management"]
description = "Translate between 1D indices and 2D coordinates with wrapping"
Expand Down
6 changes: 3 additions & 3 deletions README.md
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

Use WrappingCoords2d to store data from a 2D grid into a 1D container such as `std::vec::Vec`. Index operations wrap around in both dimensions. This 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 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).

WrappingCoords2d is useful to design cellular automata and agent-based models. Just like my [ABM project](https://github.com/facorread/rust-agent-based-models), WrappingCoords2d enables you to use the [Entity-Component-System (ECS)](https://en.wikipedia.org/wiki/Entity_component_system) software architecture.
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.

Index operations wrap around in both dimensions. See the examples in the documentation for [`WrappingCoords2d`](https://docs.rs/wrapping-coords2d/latest/wrapping-coords2d/).
See some examples in the documentation for the [`wrapping_coords2d`](https://docs.rs/wrapping-coords2d/latest/wrapping-coords2d/) crate.
12 changes: 8 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,18 @@
limitations under the License.
*/

#![doc(html_root_url = "https://docs.rs/wrapping_coords2d/0.1.1")]
#![doc(html_root_url = "https://docs.rs/wrapping_coords2d/0.1.2")]

//! Translate between 1D indices and 2D coordinates with wrapping.
//!
//! Use WrappingCoords2d to store data from a 2D grid into a 1D container such as `std::vec::Vec`.
//! This is not a container; it is just a tool to manipulate indices. For a 2D container, see [`array2d`](https://docs.rs/array2d/0.2.1/array2d/).
//! For coordinate translation without wrapping, see [`ameda`](https://docs.rs/ameda/0.1.1/ameda/).
//! 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).
//!
//! WrappingCoords2d is useful to design cellular automata and agent-based models. See my [ABM project](https://github.com/facorread/rust-agent-based-models).
//! 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.
//!
//! Index operations wrap around in both dimensions. See the examples below.
//!
Expand Down

0 comments on commit bc8ee86

Please sign in to comment.