1#![warn(missing_docs)]
33
34pub mod math;
35pub mod time;
36pub mod error;
37
38pub mod prelude {
40 pub use crate::math::{Transform, GlobalTransform};
42 pub use crate::math::geometry::{Rect, Circle, Bounds2D, Bounds3D};
43 pub use crate::math::interpolation::{Lerp, Slerp, Interpolate};
44
45 pub use crate::time::{Time, Timer};
47
48 pub use crate::error::{AnvilKitError, Result};
50
51 pub use glam::{
53 Vec2, Vec3, Vec4,
54 Mat3, Mat4,
55 Quat,
56 UVec2, UVec3, UVec4,
57 IVec2, IVec3, IVec4,
58 };
59
60 pub use std::f32::consts as math_consts;
62}
63
64pub use math::*;
66pub use time::*;
67pub use error::*;
68
69pub use glam::{
71 Vec2, Vec3, Vec4,
72 Mat3, Mat4,
73 Quat,
74 UVec2, UVec3, UVec4,
75 IVec2, IVec3, IVec4,
76};
77
78pub const VERSION: &str = env!("CARGO_PKG_VERSION");
80
81pub const BUILD_INFO: &str = concat!(
83 "AnvilKit Core v",
84 env!("CARGO_PKG_VERSION"),
85);
86
87#[cfg(test)]
88mod tests {
89 use super::*;
90
91 #[test]
92 fn test_version_info() {
93 assert!(!VERSION.is_empty());
94 assert!(BUILD_INFO.contains(VERSION));
95 }
96
97 #[test]
98 fn test_prelude_imports() {
99 use crate::prelude::*;
100
101 let _transform = Transform::IDENTITY;
103 let _time = Time::new();
104 let _rect = Rect::new(Vec2::ZERO, Vec2::ONE);
105 }
106}