Skip to content

Commit

Permalink
Add missing mint type conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
stefnotch committed Oct 12, 2023
1 parent 4b95013 commit a8cc081
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions src/impl_mint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ macro_rules! from_vec4s {

from_vec2s!(
mint::Vector2<f32> => Vec2,
mint::Point2<f32> => Vec2
mint::Point2<f32> => Vec2,
mint::Vector2<i32> => IVec2,
mint::Point2<i32> => IVec2,
mint::Vector2<u32> => UVec2,
mint::Point2<u32> => UVec2
);
#[cfg(feature = "f64")]
from_vec2s!(
Expand All @@ -78,17 +82,27 @@ from_vec2s!(

from_vec3s!(
mint::Vector3<f32> => Vec3,
mint::Point3<f32> => Vec3
mint::Point3<f32> => Vec3,
mint::Vector3<i32> => IVec3,
mint::Point3<i32> => IVec3,
mint::Vector3<u32> => UVec3,
mint::Point3<u32> => UVec3
);
#[cfg(feature = "f64")]
from_vec3s!(
mint::Vector3<f64> => DVec3,
mint::Point3<f64> => DVec3
);

from_vec4s!(mint::Vector4<f32> => Vec4);
from_vec4s!(
mint::Vector4<f32> => Vec4,
mint::Vector4<i32> => IVec4,
mint::Vector4<u32> => UVec4
);
#[cfg(feature = "f64")]
from_vec4s!(mint::Vector4<f64> => DVec4);
from_vec4s!(
mint::Vector4<f64> => DVec4
);

macro_rules! from_mat2s {
($($minttype:ty => $uvtype:ty),+) => {
Expand Down

0 comments on commit a8cc081

Please sign in to comment.