From 8dc90671216795bacc918bdc0ee7969c3b1dd39e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Crozet?= Date: Sun, 23 Jun 2013 16:08:50 +0000 Subject: [PATCH] Coding style fix. --- src/dim3/vec3.rs | 2 +- src/ndim/dmat.rs | 6 +++--- src/ndim/dvec.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/dim3/vec3.rs b/src/dim3/vec3.rs index 7cfa5eab..ea70ef9b 100644 --- a/src/dim3/vec3.rs +++ b/src/dim3/vec3.rs @@ -226,7 +226,7 @@ Basis for Vec3 fn orthogonal_subspace_basis(&self) -> ~[Vec3] { 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() }; diff --git a/src/ndim/dmat.rs b/src/ndim/dmat.rs index 45d213ef..c15f0e5c 100644 --- a/src/ndim/dmat.rs +++ b/src/ndim/dmat.rs @@ -163,7 +163,7 @@ Inv for DMat 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 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 for iterate(0u, dim) |l| { - if (l != k) + if l != k { let normalizer = self.at(l, k); diff --git a/src/ndim/dvec.rs b/src/ndim/dvec.rs index af348472..9145cb85 100644 --- a/src/ndim/dvec.rs +++ b/src/ndim/dvec.rs @@ -57,7 +57,7 @@ impl> DVec 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> DVec 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()); } }