mod boolean_op;
pub mod bounds;
pub mod color;
pub mod core_error;
pub mod geo2d;
pub mod geo3d;
pub mod length;
pub mod render;
pub mod traits;
pub mod triangle;
pub type Integer = i64;
pub type Scalar = f64;
pub type Vec2 = cgmath::Vector2<Scalar>;
pub type Vec3 = cgmath::Vector3<Scalar>;
pub type Vec4 = cgmath::Vector4<Scalar>;
pub type Mat2 = cgmath::Matrix2<Scalar>;
pub type Mat3 = cgmath::Matrix3<Scalar>;
pub type Mat4 = cgmath::Matrix4<Scalar>;
pub type Angle = cgmath::Rad<Scalar>;
pub use length::Length;
pub mod consts {
pub use std::f64::consts::PI;
pub use std::f64::consts::TAU;
}
pub use boolean_op::BooleanOp;
pub use bounds::*;
pub use color::*;
pub use core_error::*;
pub use geo2d::*;
pub use geo3d::*;
pub use render::*;
pub use triangle::*;
pub fn mat4_to_mat3(m: &Mat4) -> Mat3 {
Mat3::from_cols(m.x.truncate_n(2), m.y.truncate_n(2), m.w.truncate_n(2))
}
pub fn mat3_to_mat4(m: &Mat3) -> Mat4 {
Mat4::new(
m.x.x, m.x.y, 0.0, m.x.z, m.y.x, m.y.y, 0.0, m.y.z, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, )
}