diff --git a/src/matrix.rs b/src/matrix.rs index f364072..aa1aaf2 100644 --- a/src/matrix.rs +++ b/src/matrix.rs @@ -100,15 +100,6 @@ impl Matrix2 { } } -impl> Matrix2 { - /// Negate this `Matrix2` in-place. - #[inline] - pub fn neg_self(&mut self) { - self[0].neg_self(); - self[1].neg_self(); - } -} - impl Matrix3 { /// Create a new matrix, providing values for each index. #[inline] @@ -200,16 +191,6 @@ impl Matrix3 { } } -impl> Matrix3 { - /// Negate this `Matrix3` in-place. - #[inline] - pub fn neg_self(&mut self) { - self[0].neg_self(); - self[1].neg_self(); - self[2].neg_self(); - } -} - impl Matrix4 { /// Create a new matrix, providing values for each index. #[inline] @@ -267,17 +248,6 @@ impl Matrix4 { } } -impl> Matrix4 { - /// Negate this `Matrix4` in-place. - #[inline] - pub fn neg_self(&mut self) { - self[0].neg_self(); - self[1].neg_self(); - self[2].neg_self(); - self[3].neg_self(); - } -} - /// A column-major matrix of arbitrary dimensions. pub trait Matrix where // FIXME: Ugly type signatures - blocked by rust-lang/rust#24092 diff --git a/src/vector.rs b/src/vector.rs index 6b8a80e..8d5682c 100644 --- a/src/vector.rs +++ b/src/vector.rs @@ -216,14 +216,6 @@ macro_rules! impl_vector { } } - impl<$S: Copy + Neg> $VectorN<$S> { - /// Negate this vector in-place (multiply by -1). - #[inline] - pub fn neg_self(&mut self) { - $(self.$field = -self.$field);+ - } - } - /// The short constructor. #[inline] pub fn $constructor($($field: S),+) -> $VectorN {