From 651351f0871da99e375a3a50b9c6666d58e14cf8 Mon Sep 17 00:00:00 2001 From: Hayden Kowalchuk <819028+mrneo240@users.noreply.github.com> Date: Thu, 5 Mar 2020 14:50:14 -0500 Subject: [PATCH] fix: glu.c changed to float, reordered math --- GL/glu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GL/glu.c b/GL/glu.c index 0888207..9b3e8cf 100644 --- a/GL/glu.c +++ b/GL/glu.c @@ -4,9 +4,9 @@ /* Set the Perspective */ void APIENTRY gluPerspective(GLfloat angle, GLfloat aspect, GLfloat znear, GLfloat zfar) { - GLdouble fW, fH; + GLfloat fW, fH; - fH = tan(angle / 360 * F_PI) * znear; + fH = tanf(angle * (F_PI / 360.0f)) * znear; fW = fH * aspect; glFrustum(-fW, fW, -fH, fH, znear, zfar);