point_nd/lib.rs
1#![no_std]
2
3//!
4//! A simple and flexible no-std struct, based on an array, used to model points on axes of any dimensions.
5//!
6//! See the `PointND` struct for basic usage
7//!
8//! # Compatibility
9//!
10//! This crate was designed to be `no_std` and `wasm` compatible, and has been tested in those environments.
11//!
12//! `PointND` uses constant generics, it is recommended for use with a Rust version of **at least 1.51**
13//!
14//! # Features
15//!
16//! - `conv_methods`
17//!
18//! - **Enabled by default**
19//!
20//! - Methods which access and transform the values contained by **1..=4** dimensional points.
21//!
22//! - Enables the following sub-features (each of which can be enabled individually if needed):
23//!
24//! - `x`: Convenience methods for `1D` points
25//!
26//! - `y`: Convenience methods for `2D` points
27//!
28//! - `z`: Convenience methods for `3D` points
29//!
30//! - `w`: Convenience methods for `4D` points
31//!
32//! - `appliers`
33//!
34//! - **Enabled by default**
35//!
36//! - Methods which allow function pointers to be passed to points in order to transform values.
37//!
38//! - If this and the `var-dims` feature are disabled, this crate will include zero dependencies
39//!
40//! - `var-dims`
41//!
42//! - Methods which append or remove values from points.
43//!
44//! - If this and the `appliers` feature are disabled, this crate will include zero dependencies
45//!
46
47mod point;
48mod utils;
49
50pub use point::PointND;
51
52#[cfg(feature = "appliers")]
53pub use utils::{ApplyFn, ApplyDimsFn, ApplyValsFn, ApplyPointFn};