diff --git a/src/funs/projection.rs b/src/funs/projection.rs index c9609ec..3b1e2c0 100644 --- a/src/funs/projection.rs +++ b/src/funs/projection.rs @@ -1,5 +1,5 @@ use funs::triganomic::tan; -use angle::Radians; +use angle::Angle; use mat::Mat4; use num::cast::cast; use num::consts::pi; @@ -12,8 +12,8 @@ use num::ext::FloatExt; * can be found [here](http://www.opengl.org/wiki/GluPerspective_code). */ #[inline(always)] -pure fn perspective(fovy: Radians, aspectRatio: T, near: T, far: T) -> Mat4 { - let ymax = near * tan(&fovy); +pure fn perspective>(fovy: A, aspectRatio: T, near: T, far: T) -> Mat4 { + let ymax = near * tan(&fovy.to_radians()); let xmax = ymax * aspectRatio; frustum(-xmax, xmax, -ymax, ymax, near, far)