Remove neg_self methods

These are a weird methods... they aren't associated with any traits. I think they were left-over from before we moved to operator impls.
This commit is contained in:
Brendan Zabarauskas 2016-04-04 20:34:07 +10:00
parent 019cac1f74
commit f766973a74
2 changed files with 0 additions and 38 deletions

View file

@ -100,15 +100,6 @@ impl<S: BaseFloat> Matrix2<S> {
}
}
impl<S: Copy + Neg<Output = S>> Matrix2<S> {
/// Negate this `Matrix2` in-place.
#[inline]
pub fn neg_self(&mut self) {
self[0].neg_self();
self[1].neg_self();
}
}
impl<S: BaseFloat> Matrix3<S> {
/// Create a new matrix, providing values for each index.
#[inline]
@ -200,16 +191,6 @@ impl<S: BaseFloat> Matrix3<S> {
}
}
impl<S: Copy + Neg<Output = S>> Matrix3<S> {
/// 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<S: BaseFloat> Matrix4<S> {
/// Create a new matrix, providing values for each index.
#[inline]
@ -267,17 +248,6 @@ impl<S: BaseFloat> Matrix4<S> {
}
}
impl<S: Copy + Neg<Output = S>> Matrix4<S> {
/// 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

View file

@ -216,14 +216,6 @@ macro_rules! impl_vector {
}
}
impl<$S: Copy + Neg<Output = $S>> $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<S>($($field: S),+) -> $VectorN<S> {