lol idk #1

Open
Quaternions wants to merge 826 commits from StrafesNET/strafe-project:master into master
Showing only changes of commit 1a6ece1312 - Show all commits

View File

@ -20,6 +20,18 @@ macro_rules! impl_matrix {
array:self.array.map(|inner|inner.map(&f)),
}
}
#[inline]
pub fn transpose(self)->Matrix<Y,X,T>{
//how did I think of this
let mut array_of_iterators=self.array.map(|axis|axis.into_iter());
Matrix{
array:core::array::from_fn(|_|
array_of_iterators.each_mut().map(|iter|
iter.next().unwrap()
)
)
}
}
}
impl<const X:usize,const Y:usize,T> Matrix<X,Y,T>
where