strafe-client-jed/fixed_wide_vectors/src/matrix.rs

17 lines
425 B
Rust
Raw Normal View History

2024-09-06 20:23:55 +00:00
use crate::vector::Vector;
2024-09-05 22:43:02 +00:00
#[derive(Clone,Copy,Hash,Eq,PartialEq)]
2024-09-05 20:36:38 +00:00
pub struct Matrix<const X:usize,const Y:usize,T>{
2024-09-06 17:52:17 +00:00
pub(crate) array:[[T;X];Y],
2024-08-30 20:02:48 +00:00
}
2024-09-05 20:36:38 +00:00
crate::impl_matrix!();
2024-09-04 20:38:29 +00:00
2024-09-06 20:23:55 +00: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 20:38:29 +00:00
//Special case 3x3 matrix operations because I cba to write macros for the arbitrary cases
2024-09-06 18:25:46 +00:00
crate::impl_matrix_3x3!();