#![warn(missing_docs)]
pub mod math;
pub mod time;
pub mod error;
pub mod prelude {
pub use crate::math::{Transform, GlobalTransform};
pub use crate::math::geometry::{Rect, Circle, Bounds2D, Bounds3D};
pub use crate::math::interpolation::{Lerp, Slerp, Interpolate};
pub use crate::time::{Time, Timer};
pub use crate::error::{AnvilKitError, Result};
pub use glam::{
Vec2, Vec3, Vec4,
Mat3, Mat4,
Quat,
UVec2, UVec3, UVec4,
IVec2, IVec3, IVec4,
};
pub use std::f32::consts as math_consts;
}
pub use math::*;
pub use time::*;
pub use error::*;
pub use glam::{
Vec2, Vec3, Vec4,
Mat3, Mat4,
Quat,
UVec2, UVec3, UVec4,
IVec2, IVec3, IVec4,
};
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
pub const BUILD_INFO: &str = concat!(
"AnvilKit Core v",
env!("CARGO_PKG_VERSION"),
);
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_version_info() {
assert!(!VERSION.is_empty());
assert!(BUILD_INFO.contains(VERSION));
}
#[test]
fn test_prelude_imports() {
use crate::prelude::*;
let _transform = Transform::IDENTITY;
let _time = Time::new();
let _rect = Rect::new(Vec2::ZERO, Vec2::ONE);
}
}