From 015f0d8eb1fda524fbeeb6bd22c53de9b0ef1cd6 Mon Sep 17 00:00:00 2001 From: Brendan Zabarauskas Date: Sat, 8 Sep 2012 12:41:04 +1000 Subject: [PATCH] OCD formatting --- src/mat.rs | 8 ++++---- src/projection.rs | 32 ++++++++++++++++---------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/mat.rs b/src/mat.rs index 1b11e89..26e5c41 100644 --- a/src/mat.rs +++ b/src/mat.rs @@ -682,10 +682,10 @@ impl mat4: Matrix { impl mat4: Matrix4 { #[inline(always)] pure fn scale(&&vec:vec3) -> mat4 { - self.mul_m(mat4(vec.x(), 0f, 0f, 0f, - 0f, vec.y(), 0f, 0f, - 0f, 0f, vec.z(), 0f, - 0f, 0f, 0f, 1f)) + self.mul_m(mat4(vec.x(), 0f, 0f, 0f, + 0f, vec.y(), 0f, 0f, + 0f, 0f, vec.z(), 0f, + 0f, 0f, 0f, 1f)) } #[inline(always)] diff --git a/src/projection.rs b/src/projection.rs index eca62e2..e3cd1e0 100644 --- a/src/projection.rs +++ b/src/projection.rs @@ -22,22 +22,22 @@ pure fn perspective(fovy:float, aspectRatio:float, near:float, far:float) -> mat // TODO: double check algorithm // pure fn frustum(left:float, right:float, bottom:float, top:float, near:float, far:float) -> mat4 { - let m00:float = (2f * near) / (right - left); - let m01:float = 0f; - let m02:float = 0f; - let m03:float = 0f; - let m10:float = 0f; - let m11:float = (2f * near)/(top - bottom); - let m12:float = 0f; - let m13:float = 0f; - let m20:float = (right + left) / (right - left); - let m21:float = (top + bottom) / (top - bottom); - let m22:float = -(far + near) / (far - near); - let m23:float = -1f; - let m30:float = 0f; - let m31:float = 0f; - let m32:float = -(2f * far * near) / (far - near); - let m33:float = 0f; + let m00 = (2f * near) / (right - left); + let m01 = 0f; + let m02 = 0f; + let m03 = 0f; + let m10 = 0f; + let m11 = (2f * near)/(top - bottom); + let m12 = 0f; + let m13 = 0f; + let m20 = (right + left) / (right - left); + let m21 = (top + bottom) / (top - bottom); + let m22 = -(far + near) / (far - near); + let m23 = -1f; + let m30 = 0f; + let m31 = 0f; + let m32 = -(2f * far * near) / (far - near); + let m33 = 0f; return mat4(m00, m01, m02, m03, m10, m11, m12, m13,