Update lifetime notation
This commit is contained in:
parent
2c2b7a71d0
commit
ad4ee9c436
8 changed files with 18 additions and 18 deletions
|
@ -245,7 +245,7 @@ pub trait MutableMatrix<T,V>: Matrix<T,V> {
|
|||
*
|
||||
* A mutable reference to the column at `i`
|
||||
*/
|
||||
fn col_mut(&mut self, i: uint) -> &self/mut V;
|
||||
fn col_mut(&mut self, i: uint) -> &'self mut V;
|
||||
|
||||
/**
|
||||
* Swap two columns of the matrix in place
|
||||
|
|
|
@ -210,7 +210,7 @@ impl<T:Copy + Float + FuzzyEq<T> + Add<T,T> + Sub<T,T> + Mul<T,T> + Div<T,T> + N
|
|||
|
||||
impl<T:Copy + Float + FuzzyEq<T> + Add<T,T> + Sub<T,T> + Mul<T,T> + Div<T,T> + Neg<T>> MutableMatrix<T, Vec2<T> > for Mat2<T> {
|
||||
#[inline(always)]
|
||||
fn col_mut(&mut self, i: uint) -> &self/mut Vec2<T> {
|
||||
fn col_mut(&mut self, i: uint) -> &'self mut Vec2<T> {
|
||||
match i {
|
||||
0 => &mut self.x,
|
||||
1 => &mut self.y,
|
||||
|
|
|
@ -477,7 +477,7 @@ impl<T:Copy + Float + FuzzyEq<T> + Add<T,T> + Sub<T,T> + Mul<T,T> + Div<T,T> + N
|
|||
|
||||
impl<T:Copy + Float + FuzzyEq<T> + Add<T,T> + Sub<T,T> + Mul<T,T> + Div<T,T> + Neg<T>> MutableMatrix<T, Vec3<T>> for Mat3<T> {
|
||||
#[inline(always)]
|
||||
fn col_mut(&mut self, i: uint) -> &self/mut Vec3<T> {
|
||||
fn col_mut(&mut self, i: uint) -> &'self mut Vec3<T> {
|
||||
match i {
|
||||
0 => &mut self.x,
|
||||
1 => &mut self.y,
|
||||
|
|
|
@ -401,7 +401,7 @@ impl<T:Copy + Float + FuzzyEq<T> + Add<T,T> + Sub<T,T> + Mul<T,T> + Div<T,T> + N
|
|||
|
||||
impl<T:Copy + Float + FuzzyEq<T> + Add<T,T> + Sub<T,T> + Mul<T,T> + Div<T,T> + Neg<T>> MutableMatrix<T, Vec4<T>> for Mat4<T> {
|
||||
#[inline(always)]
|
||||
fn col_mut(&mut self, i: uint) -> &self/mut Vec4<T> {
|
||||
fn col_mut(&mut self, i: uint) -> &'self mut Vec4<T> {
|
||||
match i {
|
||||
0 => &mut self.x,
|
||||
1 => &mut self.y,
|
||||
|
|
|
@ -35,7 +35,7 @@ pub trait MutableVector<T>: Vector<T> {
|
|||
/**
|
||||
* Get a mutable reference to the component at `i`
|
||||
*/
|
||||
fn index_mut(&mut self, i: uint) -> &self/mut T;
|
||||
fn index_mut(&mut self, i: uint) -> &'self mut T;
|
||||
|
||||
/**
|
||||
* Swap two components of the vector in place
|
||||
|
@ -179,7 +179,7 @@ pub trait NumericVector4<T>: NumericVector<T> {
|
|||
/**
|
||||
* A mutable vector with numeric components
|
||||
*/
|
||||
pub trait MutableNumericVector<T>: MutableVector<&self/T> +
|
||||
pub trait MutableNumericVector<T>: MutableVector<&'self T> +
|
||||
NumericVector<T> {
|
||||
/**
|
||||
* Negate the vector
|
||||
|
@ -220,7 +220,7 @@ pub trait MutableNumericVector<T>: MutableVector<&self/T> +
|
|||
/**
|
||||
* A mutable 3-dimensional vector with numeric components
|
||||
*/
|
||||
pub trait MutableNumericVector3<T>: MutableNumericVector<&self/T> {
|
||||
pub trait MutableNumericVector3<T>: MutableNumericVector<&'self T> {
|
||||
/**
|
||||
* Set to the cross product of the vector and `other`
|
||||
*/
|
||||
|
@ -313,7 +313,7 @@ pub trait EuclideanVector<T>: NumericVector<T> {
|
|||
*
|
||||
* * `T` - The type of the components. This should be a floating point type.
|
||||
*/
|
||||
pub trait MutableEuclideanVector<T>: MutableNumericVector<&self/T> +
|
||||
pub trait MutableEuclideanVector<T>: MutableNumericVector<&'self T> +
|
||||
EuclideanVector<T> {
|
||||
/**
|
||||
* Normalize the vector
|
||||
|
|
|
@ -75,7 +75,7 @@ impl<T:Copy + Eq> Index<uint, T> for Vec2<T> {
|
|||
|
||||
impl<T:Copy> MutableVector<T> for Vec2<T> {
|
||||
#[inline(always)]
|
||||
fn index_mut(&mut self, i: uint) -> &self/mut T {
|
||||
fn index_mut(&mut self, i: uint) -> &'self mut T {
|
||||
match i {
|
||||
0 => &mut self.x,
|
||||
1 => &mut self.y,
|
||||
|
@ -174,7 +174,7 @@ impl<T:Copy + Number + Add<T,T> + Sub<T,T> + Mul<T,T> + Div<T,T> + Neg<T>> Numer
|
|||
}
|
||||
}
|
||||
|
||||
impl<T:Copy + Number + Add<T,T> + Sub<T,T> + Mul<T,T> + Div<T,T> + Neg<T>> MutableNumericVector<&self/T> for Vec2<T> {
|
||||
impl<T:Copy + Number + Add<T,T> + Sub<T,T> + Mul<T,T> + Div<T,T> + Neg<T>> MutableNumericVector<&'self T> for Vec2<T> {
|
||||
#[inline(always)]
|
||||
fn neg_self(&mut self) {
|
||||
*self.index_mut(0) = -*self.index_mut(0);
|
||||
|
@ -267,7 +267,7 @@ impl<T:Copy + Float + Add<T,T> + Sub<T,T> + Mul<T,T> + Div<T,T> + Neg<T>> Euclid
|
|||
}
|
||||
}
|
||||
|
||||
impl<T:Copy + Float + Add<T,T> + Sub<T,T> + Mul<T,T> + Div<T,T> + Neg<T>> MutableEuclideanVector<&self/T> for Vec2<T> {
|
||||
impl<T:Copy + Float + Add<T,T> + Sub<T,T> + Mul<T,T> + Div<T,T> + Neg<T>> MutableEuclideanVector<&'self T> for Vec2<T> {
|
||||
#[inline(always)]
|
||||
fn normalize_self(&mut self) {
|
||||
let n = one::<T>() / self.length();
|
||||
|
|
|
@ -77,7 +77,7 @@ impl<T:Copy + Eq> Index<uint, T> for Vec3<T> {
|
|||
|
||||
impl<T:Copy> MutableVector<T> for Vec3<T> {
|
||||
#[inline(always)]
|
||||
fn index_mut(&mut self, i: uint) -> &self/mut T {
|
||||
fn index_mut(&mut self, i: uint) -> &'self mut T {
|
||||
match i {
|
||||
0 => &mut self.x,
|
||||
1 => &mut self.y,
|
||||
|
@ -192,7 +192,7 @@ impl<T:Copy + Number + Add<T,T> + Sub<T,T> + Mul<T,T> + Div<T,T> + Neg<T>> Numer
|
|||
}
|
||||
}
|
||||
|
||||
impl<T:Copy + Number + Add<T,T> + Sub<T,T> + Mul<T,T> + Div<T,T> + Neg<T>> MutableNumericVector<&self/T> for Vec3<T> {
|
||||
impl<T:Copy + Number + Add<T,T> + Sub<T,T> + Mul<T,T> + Div<T,T> + Neg<T>> MutableNumericVector<&'self T> for Vec3<T> {
|
||||
#[inline(always)]
|
||||
fn neg_self(&mut self) {
|
||||
*self.index_mut(0) = -*self.index_mut(0);
|
||||
|
@ -243,7 +243,7 @@ impl<T:Copy + Number + Add<T,T> + Sub<T,T> + Mul<T,T> + Div<T,T> + Neg<T>> Mutab
|
|||
}
|
||||
}
|
||||
|
||||
impl<T:Copy + Number + Add<T,T> + Sub<T,T> + Mul<T,T> + Div<T,T> + Neg<T>> MutableNumericVector3<&self/T> for Vec3<T> {
|
||||
impl<T:Copy + Number + Add<T,T> + Sub<T,T> + Mul<T,T> + Div<T,T> + Neg<T>> MutableNumericVector3<&'self T> for Vec3<T> {
|
||||
#[inline(always)]
|
||||
fn cross_self(&mut self, other: &Vec3<T>) {
|
||||
*self = self.cross(other);
|
||||
|
@ -299,7 +299,7 @@ impl<T:Copy + Float + Add<T,T> + Sub<T,T> + Mul<T,T> + Div<T,T> + Neg<T>> Euclid
|
|||
}
|
||||
}
|
||||
|
||||
impl<T:Copy + Float + Add<T,T> + Sub<T,T> + Mul<T,T> + Div<T,T> + Neg<T>> MutableEuclideanVector<&self/T> for Vec3<T> {
|
||||
impl<T:Copy + Float + Add<T,T> + Sub<T,T> + Mul<T,T> + Div<T,T> + Neg<T>> MutableEuclideanVector<&'self T> for Vec3<T> {
|
||||
#[inline(always)]
|
||||
fn normalize_self(&mut self) {
|
||||
let n = one::<T>() / self.length();
|
||||
|
|
|
@ -75,7 +75,7 @@ impl<T:Copy + Eq> Index<uint, T> for Vec4<T> {
|
|||
|
||||
impl<T:Copy> MutableVector<T> for Vec4<T> {
|
||||
#[inline(always)]
|
||||
fn index_mut(&mut self, i: uint) -> &self/mut T {
|
||||
fn index_mut(&mut self, i: uint) -> &'self mut T {
|
||||
match i {
|
||||
0 => &mut self.x,
|
||||
1 => &mut self.y,
|
||||
|
@ -197,7 +197,7 @@ impl<T:Copy + Number> NumericVector4<T> for Vec4<T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<T:Copy + Number + Add<T,T> + Sub<T,T> + Mul<T,T> + Div<T,T> + Neg<T>> MutableNumericVector<&self/T> for Vec4<T> {
|
||||
impl<T:Copy + Number + Add<T,T> + Sub<T,T> + Mul<T,T> + Div<T,T> + Neg<T>> MutableNumericVector<&'self T> for Vec4<T> {
|
||||
#[inline(always)]
|
||||
fn neg_self(&mut self) {
|
||||
*self.index_mut(0) = -*self.index_mut(0);
|
||||
|
@ -297,7 +297,7 @@ impl<T:Copy + Float + Add<T,T> + Sub<T,T> + Mul<T,T> + Div<T,T> + Neg<T>> Euclid
|
|||
}
|
||||
}
|
||||
|
||||
impl<T:Copy + Float + Add<T,T> + Sub<T,T> + Mul<T,T> + Div<T,T> + Neg<T>> MutableEuclideanVector<&self/T> for Vec4<T> {
|
||||
impl<T:Copy + Float + Add<T,T> + Sub<T,T> + Mul<T,T> + Div<T,T> + Neg<T>> MutableEuclideanVector<&'self T> for Vec4<T> {
|
||||
#[inline(always)]
|
||||
fn normalize_self(&mut self) {
|
||||
let n = one::<T>() / self.length();
|
||||
|
|
Loading…
Reference in a new issue