Coding style fix.

This commit is contained in:
Sébastien Crozet 2013-06-23 16:08:50 +00:00
parent cfd7bac305
commit 8dc9067121
3 changed files with 6 additions and 6 deletions

View File

@ -226,7 +226,7 @@ Basis for Vec3<N>
fn orthogonal_subspace_basis(&self) -> ~[Vec3<N>] fn orthogonal_subspace_basis(&self) -> ~[Vec3<N>]
{ {
let a = let a =
if (abs(copy self.x) > abs(copy self.y)) if abs(copy self.x) > abs(copy self.y)
{ Vec3::new(copy self.z, Zero::zero(), -copy self.x).normalized() } { Vec3::new(copy self.z, Zero::zero(), -copy self.x).normalized() }
else else
{ Vec3::new(Zero::zero(), -self.z, copy self.y).normalized() }; { Vec3::new(Zero::zero(), -self.z, copy self.y).normalized() };

View File

@ -163,7 +163,7 @@ Inv for DMat<N>
while (n0 != dim) while (n0 != dim)
{ {
if (self.at(n0, k) != _0T) if self.at(n0, k) != _0T
{ break; } { break; }
n0 = n0 + 1; n0 = n0 + 1;
@ -172,7 +172,7 @@ Inv for DMat<N>
assert!(n0 != dim); // non inversible matrix assert!(n0 != dim); // non inversible matrix
// swap pivot line // swap pivot line
if (n0 != k) if n0 != k
{ {
for iterate(0u, dim) |j| for iterate(0u, dim) |j|
{ {
@ -200,7 +200,7 @@ Inv for DMat<N>
for iterate(0u, dim) |l| for iterate(0u, dim) |l|
{ {
if (l != k) if l != k
{ {
let normalizer = self.at(l, k); let normalizer = self.at(l, k);

View File

@ -57,7 +57,7 @@ impl<N: Copy + DivisionRing + Algebraic + Clone + ApproxEq<N>> DVec<N>
basis_element.at[i] = One::one(); basis_element.at[i] = One::one();
if (res.len() == dim - 1) if res.len() == dim - 1
{ break; } { break; }
let mut elt = basis_element.clone(); let mut elt = basis_element.clone();
@ -67,7 +67,7 @@ impl<N: Copy + DivisionRing + Algebraic + Clone + ApproxEq<N>> DVec<N>
for res.each |v| for res.each |v|
{ elt = elt - v.scalar_mul(&elt.dot(v)) }; { elt = elt - v.scalar_mul(&elt.dot(v)) };
if (!elt.sqnorm().approx_eq(&Zero::zero())) if !elt.sqnorm().approx_eq(&Zero::zero())
{ res.push(elt.normalized()); } { res.push(elt.normalized()); }
} }