2024-09-06 13:23:55 -07:00
|
|
|
use crate::vector::Vector;
|
|
|
|
|
2024-09-11 12:06:58 -07:00
|
|
|
#[derive(Clone,Copy,Debug,Hash,Eq,PartialEq)]
|
2024-09-05 13:36:38 -07:00
|
|
|
pub struct Matrix<const X:usize,const Y:usize,T>{
|
2024-09-26 15:06:01 -07:00
|
|
|
pub(crate) array:[[T;Y];X],
|
2024-08-30 13:02:48 -07:00
|
|
|
}
|
|
|
|
|
2024-09-05 13:36:38 -07:00
|
|
|
crate::impl_matrix!();
|
2024-09-04 13:38:29 -07:00
|
|
|
|
2024-09-06 13:23:55 -07:00
|
|
|
crate::impl_matrix_extend!(2,2);
|
|
|
|
crate::impl_matrix_extend!(2,3);
|
|
|
|
crate::impl_matrix_extend!(3,2);
|
|
|
|
crate::impl_matrix_extend!(3,3);
|
|
|
|
|
2024-09-04 13:38:29 -07:00
|
|
|
//Special case 3x3 matrix operations because I cba to write macros for the arbitrary cases
|
2024-09-10 11:32:42 -07:00
|
|
|
#[cfg(feature="named-fields")]
|
2024-09-06 11:25:46 -07:00
|
|
|
crate::impl_matrix_3x3!();
|