Improve how the dummy parameter are passed to the Dim::dim function.
This commit is contained in:
parent
82ddda154f
commit
346a803b7f
|
@ -209,8 +209,7 @@ Rand for Rotmat<Mat3<N>> {
|
||||||
impl<M: Dim> Dim for Rotmat<M> {
|
impl<M: Dim> Dim for Rotmat<M> {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn dim(_: Option<Rotmat<M>>) -> uint {
|
fn dim(_: Option<Rotmat<M>>) -> uint {
|
||||||
let _dim: Option<M> = None;
|
Dim::dim(None::<M>)
|
||||||
Dim::dim(_dim)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,8 +86,7 @@ impl<N: Clone + Num + Algebraic> Transform<Rotmat<Mat3<N>>, Vec3<N>> {
|
||||||
impl<M: Dim, V> Dim for Transform<M, V> {
|
impl<M: Dim, V> Dim for Transform<M, V> {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn dim(_: Option<Transform<M, V>>) -> uint {
|
fn dim(_: Option<Transform<M, V>>) -> uint {
|
||||||
let _dim: Option<M> = None;
|
Dim::dim(None::<M>)
|
||||||
Dim::dim(_dim)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -285,8 +284,7 @@ ToHomogeneous<M2> for Transform<M, V> {
|
||||||
let mut res = self.submat.to_homogeneous();
|
let mut res = self.submat.to_homogeneous();
|
||||||
|
|
||||||
// copy the translation
|
// copy the translation
|
||||||
let _dim: Option<M2> = None;
|
let dim = Dim::dim(None::<M2>);
|
||||||
let dim = Dim::dim(_dim);
|
|
||||||
|
|
||||||
res.set_column(dim - 1, self.subtrans.to_homogeneous());
|
res.set_column(dim - 1, self.subtrans.to_homogeneous());
|
||||||
|
|
||||||
|
@ -297,8 +295,7 @@ ToHomogeneous<M2> for Transform<M, V> {
|
||||||
impl<M: Column<V> + Dim, M2: FromHomogeneous<M>, V>
|
impl<M: Column<V> + Dim, M2: FromHomogeneous<M>, V>
|
||||||
FromHomogeneous<M> for Transform<M2, V> {
|
FromHomogeneous<M> for Transform<M2, V> {
|
||||||
fn from(m: &M) -> Transform<M2, V> {
|
fn from(m: &M) -> Transform<M2, V> {
|
||||||
let _dim: Option<M> = None;
|
Transform::new(FromHomogeneous::from(m), m.column(Dim::dim(None::<M>) - 1))
|
||||||
Transform::new(FromHomogeneous::from(m), m.column(Dim::dim(_dim) - 1))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -502,10 +502,8 @@ macro_rules! outer_impl(
|
||||||
fn outer(&self, other: &$t<N>) -> $m<N> {
|
fn outer(&self, other: &$t<N>) -> $m<N> {
|
||||||
let mut res: $m<N> = Zero::zero();
|
let mut res: $m<N> = Zero::zero();
|
||||||
|
|
||||||
let _dim: Option<$t<N>> = None;
|
for i in range(0u, Dim::dim(None::<$t<N>>)) {
|
||||||
for i in range(0u, Dim::dim(_dim)) {
|
for j in range(0u, Dim::dim(None::<$t<N>>)) {
|
||||||
let _dim: Option<$t<N>> = None;
|
|
||||||
for j in range(0u, Dim::dim(_dim)) {
|
|
||||||
res.set((i, j), self.at(i) * other.at(j))
|
res.set((i, j), self.at(i) * other.at(j))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue