Fixed issue #13
This commit is contained in:
parent
40c5f5deb8
commit
f8ad8aa02b
|
@ -2,8 +2,8 @@
|
|||
|
||||
#![allow(missing_doc)] // we hide doc to not have to document the $trhs double dispatch trait.
|
||||
|
||||
use rand::Rand;
|
||||
use rand;
|
||||
use std::rand::Rand;
|
||||
use std::rand;
|
||||
use std::num::{One, Zero};
|
||||
use traits::operations::ApproxEq;
|
||||
use std::mem;
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
#![allow(missing_doc)] // we hide doc to not have to document the $trhs double dispatch trait.
|
||||
|
||||
use std::num::{Zero, One, Float};
|
||||
use rand::Rand;
|
||||
use rand;
|
||||
use std::rand::Rand;
|
||||
use std::rand;
|
||||
use std::slice::{Items, MutItems};
|
||||
use traits::operations::ApproxEq;
|
||||
use std::iter::FromIterator;
|
||||
|
|
|
@ -122,7 +122,7 @@ impl<N: Clone> Row<Vec3<N>> for Mat3<N> {
|
|||
0 => Vec3::new(self.m11.clone(), self.m12.clone(), self.m13.clone()),
|
||||
1 => Vec3::new(self.m21.clone(), self.m22.clone(), self.m23.clone()),
|
||||
2 => Vec3::new(self.m31.clone(), self.m32.clone(), self.m33.clone()),
|
||||
_ => fail!("Index out of range: 3d matrices do not have " + i.to_str() + " rows.")
|
||||
_ => fail!("Index out of range: 3d matrices do not have {} rows.", i.to_str())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -144,7 +144,7 @@ impl<N: Clone> Row<Vec3<N>> for Mat3<N> {
|
|||
self.m32 = r.y.clone();
|
||||
self.m33 = r.z;
|
||||
},
|
||||
_ => fail!("Index out of range: 3d matrices do not have " + i.to_str() + " rows.")
|
||||
_ => fail!("Index out of range: 3d matrices do not have {} rows.", i.to_str())
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -162,7 +162,7 @@ impl<N: Clone> Col<Vec3<N>> for Mat3<N> {
|
|||
0 => Vec3::new(self.m11.clone(), self.m21.clone(), self.m31.clone()),
|
||||
1 => Vec3::new(self.m12.clone(), self.m22.clone(), self.m32.clone()),
|
||||
2 => Vec3::new(self.m13.clone(), self.m23.clone(), self.m33.clone()),
|
||||
_ => fail!("Index out of range: 3d matrices do not have " + i.to_str() + " cols.")
|
||||
_ => fail!("Index out of range: 3d matrices do not have {} cols.", i.to_str() )
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -184,7 +184,7 @@ impl<N: Clone> Col<Vec3<N>> for Mat3<N> {
|
|||
self.m23 = r.y.clone();
|
||||
self.m33 = r.z;
|
||||
},
|
||||
_ => fail!("Index out of range: 3d matrices do not have " + i.to_str() + " cols.")
|
||||
_ => fail!("Index out of range: 3d matrices do not have {} cols.", i.to_str() )
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ impl<N: Clone> Row<Vec1<N>> for Vec2<N> {
|
|||
match i {
|
||||
0 => Vec1::new(self.x.clone()),
|
||||
1 => Vec1::new(self.y.clone()),
|
||||
_ => fail!("Index out of range: 2d vectors do not have " + i.to_str() + " rows.")
|
||||
_ => fail!("Index out of range: 2d vectors do not have {} rows. ", i.to_str())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ impl<N: Clone> Row<Vec1<N>> for Vec2<N> {
|
|||
match i {
|
||||
0 => self.x = r.x,
|
||||
1 => self.y = r.x,
|
||||
_ => fail!("Index out of range: 2d vectors do not have " + i.to_str() + " rows.")
|
||||
_ => fail!("Index out of range: 2d vectors do not have {} rows.", i.to_str())
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue