temp transpose trait location (lib)

This commit is contained in:
Quaternions 2024-08-30 13:59:27 -07:00
parent d65fe40354
commit 2da8130402
2 changed files with 12 additions and 0 deletions

View File

@ -10,5 +10,11 @@ pub use matrix::Matrix2;
pub use matrix::Matrix3; pub use matrix::Matrix3;
pub use matrix::Matrix4; pub use matrix::Matrix4;
//internal trait for matrix wide_dot
trait Transpose{
type Output;
fn transpose(self)->Self::Output;
}
#[cfg(test)] #[cfg(test)]
mod tests; mod tests;

View File

@ -34,6 +34,12 @@ macro_rules! impl_matrix {
} }
} }
} }
impl<T> $crate::Transpose for $struct_outer<$struct_inner<T>>{
type Output=$struct_inner<$struct_outer<T>>;
fn transpose(self)->Self::Output{
self.transpose()
}
}
impl<T: Copy> $struct_outer<$struct_inner<T>> { impl<T: Copy> $struct_outer<$struct_inner<T>> {
#[inline(always)] #[inline(always)]