diff --git a/fixed_wide_vectors/src/macros/mod.rs b/fixed_wide_vectors/src/macros/mod.rs index 7faa7dd..2d5a568 100644 --- a/fixed_wide_vectors/src/macros/mod.rs +++ b/fixed_wide_vectors/src/macros/mod.rs @@ -250,6 +250,13 @@ macro_rules! impl_vector { }; } +#[doc(hidden)] +#[macro_export(local_inner_macros)] +macro_rules! impl_vector { + ( $struct: ident { $($field: ident), + }, ( $($generic: ident), + ), $size: expr, + $struct: ident { $($field: ident), + }, ( $($generic: ident), + ), $size: expr ) => { + } +} #[doc(hidden)] #[macro_export(local_inner_macros)] diff --git a/fixed_wide_vectors/src/vector.rs b/fixed_wide_vectors/src/vector.rs index 6e7dae6..34d29f1 100644 --- a/fixed_wide_vectors/src/vector.rs +++ b/fixed_wide_vectors/src/vector.rs @@ -66,3 +66,44 @@ pub struct Vector4 { crate::impl_vector!(Vector2 { x, y }, (T, T), 2); crate::impl_vector!(Vector3 { x, y, z }, (T, T, T), 3); crate::impl_vector!(Vector4 { x, y, z, w }, (T, T, T, T), 4); + +/* +crate::impl_matrix!( + Vector2 { x, y }, (T, T), 2, + Vector2 { x, y }, (T, T), 2, +); +crate::impl_matrix!( + Vector2 { x, y }, (T, T), 2, + Vector3 { x, y, z }, (T, T, T), 3, +); +crate::impl_matrix!( + Vector2 { x, y }, (T, T), 2, + Vector4 { x, y, z, w }, (T, T, T, T), 4, +); + +crate::impl_matrix!( + Vector3 { x, y, z }, (T, T, T), 3, + Vector2 { x, y }, (T, T), 2, +); +crate::impl_matrix!( + Vector3 { x, y, z }, (T, T, T), 3, + Vector3 { x, y, z }, (T, T, T), 3, +); +crate::impl_matrix!( + Vector3 { x, y, z }, (T, T, T), 3, + Vector4 { x, y, z, w }, (T, T, T, T), 4, +); + +crate::impl_matrix!( + Vector4 { x, y, z, w }, (T, T, T, T), 4, + Vector2 { x, y }, (T, T), 2, +); +crate::impl_matrix!( + Vector4 { x, y, z, w }, (T, T, T, T), 4, + Vector3 { x, y, z }, (T, T, T), 3, +); +crate::impl_matrix!( + Vector4 { x, y, z, w }, (T, T, T, T), 4, + Vector4 { x, y, z, w }, (T, T, T, T), 4, +); +*/