dotrix_math/
lib.rs

1//! Dotrix wrapper around cgmath
2//!
3//! This crate will either turn into our native implementation of become a wrapper to nalgebra.
4
5#![doc(html_logo_url = "https://raw.githubusercontent.com/lowenware/dotrix/master/logo.png")]
6#![warn(missing_docs)]
7
8pub mod math;
9pub use math::slerp;
10pub use cgmath::num_traits::clamp;
11pub use cgmath::num_traits::clamp_min;
12pub use cgmath::perspective;
13pub use cgmath::VectorSpace;
14pub use cgmath::InnerSpace;
15pub use cgmath::MetricSpace;
16pub use cgmath::Rotation3;
17pub use cgmath::SquareMatrix;
18pub use cgmath::Rad;
19pub use cgmath::Deg;
20
21/// 4x4 Matrix of f32
22pub type Mat4 = cgmath::Matrix4<f32>;
23/// 2 dimentional point of f32
24pub type Point2 = cgmath::Point2<f32>;
25/// 3 dimentional point of f32
26pub type Point3 = cgmath::Point3<f32>;
27/// 4 dimentional vector of f32
28pub type Vec4 = cgmath::Vector4<f32>;
29/// 3 dimentional vector of f32
30pub type Vec3 = cgmath::Vector3<f32>;
31/// 3 dimentional vector of i32
32pub type Vec3i = cgmath::Vector3<i32>;
33/// 4 dimentional vector of i32
34pub type Vec4i = cgmath::Vector4<i32>;
35/// 2 dimentional vector of f32
36pub type Vec2 = cgmath::Vector2<f32>;
37/// 2 dimentional vector of i32
38pub type Vec2i = cgmath::Vector2<i32>;
39/// 2 dimentional vector of u32
40pub type Vec2u = cgmath::Vector2<u32>;
41/// Quaternion of f32
42pub type Quat = cgmath::Quaternion<f32>;
43