Remove returns
This commit is contained in:
parent
e004fa8edd
commit
512b024350
1 changed files with 6 additions and 5 deletions
|
@ -15,7 +15,8 @@ use num::ext::FloatExt;
|
||||||
pure fn perspective<T:Copy FloatExt>(fovy: Radians<T>, aspectRatio: T, near: T, far: T) -> Mat4<T> {
|
pure fn perspective<T:Copy FloatExt>(fovy: Radians<T>, aspectRatio: T, near: T, far: T) -> Mat4<T> {
|
||||||
let ymax = near * tan(&fovy);
|
let ymax = near * tan(&fovy);
|
||||||
let xmax = ymax * aspectRatio;
|
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<T:Copy FloatExt>(left: T, right: T, bottom: T, top: T, near: T,
|
||||||
let c3r2 = -(_2 * far * near) / (far - near);
|
let c3r2 = -(_2 * far * near) / (far - near);
|
||||||
let c3r3 = _0;
|
let c3r3 = _0;
|
||||||
|
|
||||||
return Mat4::new(c0r0, c0r1, c0r2, c0r3,
|
Mat4::new(c0r0, c0r1, c0r2, c0r3,
|
||||||
c1r0, c1r1, c1r2, c1r3,
|
c1r0, c1r1, c1r2, c1r3,
|
||||||
c2r0, c2r1, c2r2, c2r3,
|
c2r0, c2r1, c2r2, c2r3,
|
||||||
c3r0, c3r1, c3r2, c3r3);
|
c3r0, c3r1, c3r2, c3r3)
|
||||||
}
|
}
|
Loading…
Reference in a new issue