From 512b02435069b7cd40ee77c2e94cc8dadf3b7843 Mon Sep 17 00:00:00 2001 From: Brendan Zabarauskas Date: Mon, 26 Nov 2012 11:52:48 +1000 Subject: [PATCH] Remove returns --- src/funs/projection.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/funs/projection.rs b/src/funs/projection.rs index 7ec9e7f..870ddd3 100644 --- a/src/funs/projection.rs +++ b/src/funs/projection.rs @@ -15,7 +15,8 @@ use num::ext::FloatExt; pure fn perspective(fovy: Radians, aspectRatio: T, near: T, far: T) -> Mat4 { let ymax = near * tan(&fovy); let xmax = ymax * aspectRatio; - return frustum(-xmax, xmax, -ymax, ymax, near, far); + + frustum(-xmax, xmax, -ymax, ymax, near, far) } // @@ -48,8 +49,8 @@ pure fn frustum(left: T, right: T, bottom: T, top: T, near: T, let c3r2 = -(_2 * far * near) / (far - near); let c3r3 = _0; - return Mat4::new(c0r0, c0r1, c0r2, c0r3, - c1r0, c1r1, c1r2, c1r3, - c2r0, c2r1, c2r2, c2r3, - c3r0, c3r1, c3r2, c3r3); + Mat4::new(c0r0, c0r1, c0r2, c0r3, + c1r0, c1r1, c1r2, c1r3, + c2r0, c2r1, c2r2, c2r3, + c3r0, c3r1, c3r2, c3r3) } \ No newline at end of file