//! Utilities and collections for 3D hexagonal maps.
//!
//! # Coordinate space
//!
//! Coordinates are in cube or axial space where `Z` is the cube axis, with an additional vertical axis `W`.
//!
//! ## Flat-top
//!
//! ```text
//!        yz +Y
//!        __
//!    yx /  \ xz +X
//! -X zx \__/ xy
//!     -Y zy
//! ```
//!
//! ## Pointy-top
//!
//! ```text
//!     yx  /\  yz  +Y
//! -X  zx |  | xz  +X
//! -Y  zy  \/  xy
//! ```
//!
//! # Crate Features
//!
//! - `serde-1`: **Enabled** by default. Serialization support via `serde`.
//! - `collections`: **Enabled** by default. Collections that work with hex coordinates.
//! - `rand-07`: Disabled by default.`rand` 0.7 distribution implementations for `Direction` and `QuadPrism`.

#![deny(clippy::correctness)]
#![warn(
    clippy::style,
    clippy::complexity,
    clippy::perf,
    clippy::pedantic,
    clippy::clone_on_ref_ptr,
    clippy::option_unwrap_used,
    clippy::result_unwrap_used,
    clippy::wrong_pub_self_convention,
    clippy::unimplemented,
    clippy::print_stdout,
    clippy::dbg_macro,
    clippy::float_cmp_const
)]
#![allow(
    clippy::cast_possible_truncation,
    clippy::cast_possible_wrap,
    clippy::cast_precision_loss,
    clippy::default_trait_access,
    clippy::empty_enum,
    clippy::module_name_repetitions,
    clippy::use_self,
    clippy::must_use_candidate
)]
#![cfg_attr(
    test,
    allow(
        clippy::wildcard_imports,
        clippy::option_unwrap_used,
        clippy::result_unwrap_used,
        clippy::redundant_clone,
    )
)]

extern crate num_traits;

#[cfg(feature = "serde-1")]
#[macro_use]
extern crate serde;

#[cfg(feature = "rand-07")]
extern crate rand;

#[cfg(feature = "collections")]
#[macro_use]
extern crate thiserror;

#[cfg(test)]
extern crate itertools;

#[cfg(feature = "collections")]
pub mod collections;
pub mod coords;
pub mod directions;
pub mod line;
pub mod quad_prism;

#[cfg(feature = "collections")]
#[doc(inline)]
pub use collections::{DirectionMap, HexMap, KdTree};
#[doc(inline)]
pub use coords::{Point, PointAxial, Vector, VectorAxial};
#[doc(inline)]
pub use directions::Direction;
#[doc(inline)]
pub use quad_prism::QuadPrism;
