diff --git a/src/matrix.rs b/src/matrix.rs index 716d36f..8ea8161 100644 --- a/src/matrix.rs +++ b/src/matrix.rs @@ -56,7 +56,7 @@ pub trait NumericMatrix { pure fn mul_v(other: &ColVec) -> ColVec; } -pub trait SquareMatrix { +pub trait NumericMatrix_NxN { pure fn add_m(other: &self) -> self; pure fn sub_m(other: &self) -> self; pure fn mul_m(other: &self) -> self; @@ -171,7 +171,7 @@ pub impl Mat2: NumericMatrix> { } } -pub impl Mat2: SquareMatrix { +pub impl Mat2: NumericMatrix_NxN { #[inline(always)] pure fn add_m(other: &Mat2) -> Mat2 { Mat2::from_cols(self[0].add_v(&other[0]), @@ -403,7 +403,7 @@ pub impl Mat3: NumericMatrix> { } } -pub impl Mat3: SquareMatrix { +pub impl Mat3: NumericMatrix_NxN { #[inline(always)] pure fn add_m(other: &Mat3) -> Mat3 { Mat3::from_cols(self[0].add_v(&other[0]), @@ -721,7 +721,7 @@ pub impl Mat4: NumericMatrix> { } } -pub impl Mat4: SquareMatrix { +pub impl Mat4: NumericMatrix_NxN { #[inline(always)] pure fn add_m(other: &Mat4) -> Mat4 { Mat4::from_cols(self[0].add_v(&other[0]),