Make projection functions public (woops!)
This commit is contained in:
parent
03a1c4581d
commit
f352cd68b4
1 changed files with 2 additions and 2 deletions
|
@ -12,7 +12,7 @@ use num::ext::FloatExt;
|
||||||
* can be found [here](http://www.opengl.org/wiki/GluPerspective_code).
|
* can be found [here](http://www.opengl.org/wiki/GluPerspective_code).
|
||||||
*/
|
*/
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pure fn perspective<T:Copy FloatExt, A:Angle<T>>(fovy: A, aspectRatio: T, near: T, far: T) -> Mat4<T> {
|
pub pure fn perspective<T:Copy FloatExt, A:Angle<T>>(fovy: A, aspectRatio: T, near: T, far: T) -> Mat4<T> {
|
||||||
let ymax = near * tan(&fovy.to_radians());
|
let ymax = near * tan(&fovy.to_radians());
|
||||||
let xmax = ymax * aspectRatio;
|
let xmax = ymax * aspectRatio;
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ pure fn perspective<T:Copy FloatExt, A:Angle<T>>(fovy: A, aspectRatio: T, near:
|
||||||
* (http://www.opengl.org/sdk/docs/man2/xhtml/glFrustum.xml) function.
|
* (http://www.opengl.org/sdk/docs/man2/xhtml/glFrustum.xml) function.
|
||||||
*/
|
*/
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pure fn frustum<T:Copy FloatExt>(left: T, right: T, bottom: T, top: T, near: T, far: T) -> Mat4<T> {
|
pub pure fn frustum<T:Copy FloatExt>(left: T, right: T, bottom: T, top: T, near: T, far: T) -> Mat4<T> {
|
||||||
let _0: T = cast(0);
|
let _0: T = cast(0);
|
||||||
let _2: T = cast(2);
|
let _2: T = cast(2);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue