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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
//! # A Math library that contains
//!
//! ## N Dimension stuff and Array Programming
//!
//! This crate define N dimensional math stuff (2d, 3d, 4d, ... nd) like vector/point of any type (float, int, uint, or even user defined) :
//!
//! - [`Vector`] (fixed size array wrapper)
//! - [`Rectangle`]
//! - [`Grid`]
//! - [`Matrix`]
//!
//! The *same* common functions such as [`min`], [`max`], [`mix`],
//! [`abs`], and [`clamp`] work for
//! - primitive values(`u32`, `i32`, `f32`, `bool`, ...)
//! - and on composite types (`Array`, `Vector`, `Color`, `Rectangle`, `Matrix`, `Grid`, ...) that implement the [`Map`] / [`MapWith`] / [`MapIntern`] / [`MapInternWith`] traits.
//!
//! Any external type implementing these traits automatically gains support for these common functions.
//!
//! ## Useful type like
//!
//! - [`Angle`]
//! - [`Time`],
//!
//! ## Generic Casting trait
//! The crate also provide generic traits for casting with the same behavior as the [as keyword](https://practice.course.rs/type-conversions/as.html) :
//! - [`CastInto`], [`CastFrom`],
//!
//! ## Generic Remapping trait
//!
//! Similar traits for casting remapping the range of an primitive to another primitive range also exist :
//! - [`CastRangeInto`], [`CastRangeFrom`]
//!
//! ## Quick start with the prelude
//!
//! There are some quick typedef in the prelude :
//!
//! - [`int`], [`uint`] and [`float`] : The default primitive precision used in the typedef. (can be change with the feature flags)
//! - [`Point2`], [`Point3`], [`Point4`] for Vector of [`int`],
//! - [`Vec2`], [`Vec3`], [`Vec4`] for Vector of [`float`],
//! - [`Rect2`], [`Rect3`], [`Rect4`] for Rectangle of [`float`],
//! - [`Rect2i`], [`Rect3i`], [`Rect4i`] for Rectangle of [`int`] (`P` for point),
//! - [`Mat2`], [`Mat3`], [`Mat4`] for Matrix of [`float`], and [`Mat2i`], [`Mat3i`], [`Mat4i`] use [`int`],
//! - [`Grid2`], [`Grid3`], [`Grid3`] can only be indexed by `Point` by default.
//!
//! ## More advanced type
//!
//! If you need more control about the precision, each type have another more generic base type :
//!
//! - [`Grid`] type uses a `Point` for the indexing precision, but that can be changed by using with the [`hexga_math::grid::GridBase`] type.
//! - [`Angle`] and [`Time`] use a [`float`] precision that can be changed using [`AngleOf`] and [`TimeOf`]
// For grid view, to display aligned value they need to be fomatted in a temporary formatter
//#![feature(try_trait_v2, try_trait_v2_residual)] // TryMap
// array try_map
use *;
use *;
use *;
use Ordering;
use ;
use ;
use PhantomData;
use *;
use ;
use ;
pub use hexga_typedef as typedef;
pub use *;
//pub mod bijection;
pub use *;
// For macro
pub use hexga_core;
// For macro
pub use serde;
use *;