Fixed bug #34, GLM_FORCE_RADIANS not working on glm::perspective

This commit is contained in:
Christophe Riccio 2013-01-02 00:05:07 +00:00
parent 9926506c7f
commit 889a7594d9

View File

@ -236,7 +236,13 @@ namespace glm
valType const & zFar valType const & zFar
) )
{ {
valType range = tan(radians(fovy / valType(2))) * zNear; #ifdef GLM_FORCE_RADIANS
valType const rad = fov;
#else
valType const rad = glm::radians(fov);
#endif
valType range = tan(radians(rad / valType(2))) * zNear;
valType left = -range * aspect; valType left = -range * aspect;
valType right = range * aspect; valType right = range * aspect;
valType bottom = -range; valType bottom = -range;