This commit is contained in:
Quaternions 2024-08-28 10:45:38 -07:00
parent 617952c1e3
commit c277c31f29
2 changed files with 48 additions and 0 deletions

View File

@ -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)]

View File

@ -66,3 +66,44 @@ pub struct Vector4<T> {
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,
);
*/