forked from StrafesNET/strafe-project
17 lines
425 B
Rust
17 lines
425 B
Rust
use crate::vector::Vector;
|
|
|
|
#[derive(Clone,Copy,Hash,Eq,PartialEq)]
|
|
pub struct Matrix<const X:usize,const Y:usize,T>{
|
|
pub(crate) array:[[T;X];Y],
|
|
}
|
|
|
|
crate::impl_matrix!();
|
|
|
|
crate::impl_matrix_extend!(2,2);
|
|
crate::impl_matrix_extend!(2,3);
|
|
crate::impl_matrix_extend!(3,2);
|
|
crate::impl_matrix_extend!(3,3);
|
|
|
|
//Special case 3x3 matrix operations because I cba to write macros for the arbitrary cases
|
|
crate::impl_matrix_3x3!();
|