transpose macro_repeated

This commit is contained in:
Quaternions 2024-09-03 10:10:30 -07:00
parent 1604888254
commit 48a8271b99
3 changed files with 11 additions and 5 deletions

View File

@ -1,7 +1,10 @@
#[doc(hidden)] #[doc(hidden)]
#[macro_export(local_inner_macros)] #[macro_export(local_inner_macros)]
macro_rules! impl_wide_vector_operations_2arg_not_const_generic { macro_rules! impl_wide_vector_operations_2arg_not_const_generic {
( ($lhs:expr, $rhs:expr), ($struct: ident { $($field: ident), + }, $size: expr) ) => { (
($struct: ident { $($field: ident), + }, $size: expr),
($lhs:expr, $rhs:expr)
) => {
impl $struct<fixed_wide::fixed::Fixed<{$lhs},{$lhs*32}>>{ impl $struct<fixed_wide::fixed::Fixed<{$lhs},{$lhs*32}>>{
paste::item!{ paste::item!{
#[inline] #[inline]
@ -23,7 +26,10 @@ macro_rules! impl_wide_vector_operations_2arg_not_const_generic {
#[doc(hidden)] #[doc(hidden)]
#[macro_export(local_inner_macros)] #[macro_export(local_inner_macros)]
macro_rules! impl_wide_vector_operations_1arg_not_const_generic { macro_rules! impl_wide_vector_operations_1arg_not_const_generic {
( $n:expr, ($struct: ident { $($field: ident), + }, $size: expr) ) => { (
($struct: ident { $($field: ident), + }, $size: expr),
$n:expr
) => {
impl $struct<fixed_wide::fixed::Fixed<{$n},{$n*32}>>{ impl $struct<fixed_wide::fixed::Fixed<{$n},{$n*32}>>{
paste::item!{ paste::item!{
#[inline] #[inline]

View File

@ -22,8 +22,8 @@ macro_rules! impl_matrix {
#[macro_export(local_inner_macros)] #[macro_export(local_inner_macros)]
macro_rules! impl_matrix_shim { macro_rules! impl_matrix_shim {
( (
$matrix_info:tt, (),
() $matrix_info:tt
) => { ) => {
$crate::impl_matrix!($matrix_info); $crate::impl_matrix!($matrix_info);
} }

View File

@ -14,7 +14,7 @@ macro_rules! macro_repeated{
$($repeated:tt),* $($repeated:tt),*
)=>{ )=>{
$( $(
$crate::$macro!($repeated, $any); $crate::$macro!($any, $repeated);
)* )*
}; };
} }