1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//! # 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 *;
pub use *;
pub use *;
// where two hexes meet
// the face of a hexagon
// where three edges meet