bestagon 0.10.0

An engine for discrete stuff in hexagonal grids
Documentation
//! # Bestagon
//!
//! `bestagon` is a library for working with hexagonal grids.
//!
//! It supports:
//! * Axial (`q`, `r`) and Cubic (`q`, `r`, `s`) coordinate systems.
//! * **Flat-topped** hexagon orientation.
//! * Neighbour calculation for Hexagons, Edges, and Nodes.
//!
//! ## Modules
//!
//! * [`hex`] - The face of a hexagon (Cells).
//! * [`edge`] - The edge between two hexagons.
//! * [`node`] - The vertex where three hexagons meet.
//!
//! ## Getting Started
//!
//! Add `bestagon` to your `Cargo.toml`.
//!
//! ```rust
//! use bestagon::prelude::*;
//!
//! let hex = HexAx::new(0, 0);
//! let neighbours: Vec<HexAx> = hex.hexes().collect();
//! assert_eq!(neighbours.len(), 6);
//!
//! // Convert to cartesian coordinates (Flat-topped)
//! let point = hex.to_cartesian();
//! ```
//!
//! ## Coordinate Systems
//!
//! * **Axial**: Uses `q` (column) and `r` (row).
//! * **Cubic**: Adds `s` such that `q + r + s = 0`. Useful for algorithms.
//!

pub use edge::*;
pub use hex::*;
pub use node::*;

pub mod cartesian;
pub mod distance;
pub mod grid_line;
pub mod hex_range;
pub mod lerp;
pub mod neighbours;
pub mod prelude;
pub mod round;

mod edge; // where two hexes meet
mod hex; // the face of a hexagon
mod node; // where three edges meet

mod division;
pub mod math;