Skip to content

Commit

Permalink
Check int feature for int conversions (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjb3d authored Dec 11, 2023
1 parent 387389b commit 05a0d94
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/impl_mint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ macro_rules! from_vec4s {

from_vec2s!(
mint::Vector2<f32> => Vec2,
mint::Point2<f32> => Vec2,
mint::Point2<f32> => Vec2
);
#[cfg(feature = "int")]
from_vec2s!(
mint::Vector2<i32> => IVec2,
mint::Point2<i32> => IVec2,
mint::Vector2<u32> => UVec2,
Expand All @@ -82,7 +85,10 @@ from_vec2s!(

from_vec3s!(
mint::Vector3<f32> => Vec3,
mint::Point3<f32> => Vec3,
mint::Point3<f32> => Vec3
);
#[cfg(feature = "int")]
from_vec3s!(
mint::Vector3<i32> => IVec3,
mint::Point3<i32> => IVec3,
mint::Vector3<u32> => UVec3,
Expand All @@ -95,7 +101,10 @@ from_vec3s!(
);

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

0 comments on commit 05a0d94

Please sign in to comment.