mirror of
https://github.com/g-truc/glm.git
synced 2024-11-10 04:31:47 +00:00
Fixed bug #34, GLM_FORCE_RADIANS not working on glm::perspective
This commit is contained in:
parent
9926506c7f
commit
889a7594d9
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user