Coding style fix.
This commit is contained in:
parent
cfd7bac305
commit
8dc9067121
|
@ -226,7 +226,7 @@ Basis for Vec3<N>
|
|||
fn orthogonal_subspace_basis(&self) -> ~[Vec3<N>]
|
||||
{
|
||||
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() }
|
||||
else
|
||||
{ Vec3::new(Zero::zero(), -self.z, copy self.y).normalized() };
|
||||
|
|
|
@ -163,7 +163,7 @@ Inv for DMat<N>
|
|||
|
||||
while (n0 != dim)
|
||||
{
|
||||
if (self.at(n0, k) != _0T)
|
||||
if self.at(n0, k) != _0T
|
||||
{ break; }
|
||||
|
||||
n0 = n0 + 1;
|
||||
|
@ -172,7 +172,7 @@ Inv for DMat<N>
|
|||
assert!(n0 != dim); // non inversible matrix
|
||||
|
||||
// swap pivot line
|
||||
if (n0 != k)
|
||||
if n0 != k
|
||||
{
|
||||
for iterate(0u, dim) |j|
|
||||
{
|
||||
|
@ -200,7 +200,7 @@ Inv for DMat<N>
|
|||
|
||||
for iterate(0u, dim) |l|
|
||||
{
|
||||
if (l != k)
|
||||
if l != k
|
||||
{
|
||||
let normalizer = self.at(l, k);
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ impl<N: Copy + DivisionRing + Algebraic + Clone + ApproxEq<N>> DVec<N>
|
|||
|
||||
basis_element.at[i] = One::one();
|
||||
|
||||
if (res.len() == dim - 1)
|
||||
if res.len() == dim - 1
|
||||
{ break; }
|
||||
|
||||
let mut elt = basis_element.clone();
|
||||
|
@ -67,7 +67,7 @@ impl<N: Copy + DivisionRing + Algebraic + Clone + ApproxEq<N>> DVec<N>
|
|||
for res.each |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()); }
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue