diff --git a/CHANGELOG.md b/CHANGELOG.md index d9ec5d7..c9ca74c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Update `projection` module's and submodules' documentation - Remove `rh_ydown` projection module as it was very unlikely to be useful and caused confusion. +- Add `mint` type conversions for integer vectors ## 0.9.2 diff --git a/src/impl_mint.rs b/src/impl_mint.rs index 5bcea5f..39ea4a2 100644 --- a/src/impl_mint.rs +++ b/src/impl_mint.rs @@ -68,7 +68,11 @@ macro_rules! from_vec4s { from_vec2s!( mint::Vector2 => Vec2, - mint::Point2 => Vec2 + mint::Point2 => Vec2, + mint::Vector2 => IVec2, + mint::Point2 => IVec2, + mint::Vector2 => UVec2, + mint::Point2 => UVec2 ); #[cfg(feature = "f64")] from_vec2s!( @@ -78,7 +82,11 @@ from_vec2s!( from_vec3s!( mint::Vector3 => Vec3, - mint::Point3 => Vec3 + mint::Point3 => Vec3, + mint::Vector3 => IVec3, + mint::Point3 => IVec3, + mint::Vector3 => UVec3, + mint::Point3 => UVec3 ); #[cfg(feature = "f64")] from_vec3s!( @@ -86,9 +94,15 @@ from_vec3s!( mint::Point3 => DVec3 ); -from_vec4s!(mint::Vector4 => Vec4); +from_vec4s!( + mint::Vector4 => Vec4, + mint::Vector4 => IVec4, + mint::Vector4 => UVec4 +); #[cfg(feature = "f64")] -from_vec4s!(mint::Vector4 => DVec4); +from_vec4s!( + mint::Vector4 => DVec4 +); macro_rules! from_mat2s { ($($minttype:ty => $uvtype:ty),+) => {