diff options
-rw-r--r-- | include/glu3.h | 6 | ||||
-rw-r--r-- | src/matrix.c | 6 |
2 files changed, 5 insertions, 7 deletions
diff --git a/include/glu3.h b/include/glu3.h index ea59c51..98688d3 100644 --- a/include/glu3.h +++ b/include/glu3.h @@ -661,7 +661,7 @@ void gluTranslate4v(GLUmat4 *result, const GLUvec4 *v); * Calculate a rotation matrix around an arbitrary axis * * \param axis Axis, based at the origin, around which to rotate - * \param angle Angle of rotation in degrees + * \param angle Angle of rotation in radians * * If the specificed axis is not unit length, the vector will be normalized. * @@ -752,7 +752,7 @@ void gluFrustum6f(GLUmat4 *result, GLfloat left, GLfloat right, GLfloat bottom, * Calculate a perspective projection matrix * * \param result Storage for the resulting matrix. - * \param fovy Field-of-view in the Y direction + * \param fovy Field-of-view in the Y direction, measured in radians * \param aspect The ratio of the size in the X direction to the size in the * Y direction. This is used to calculate the field-of-view in * the X direction. @@ -1099,7 +1099,7 @@ inline GLUmat4 gluTranslate(const GLUvec4 &v) * Calculate a rotation matrix around an arbitrary axis * * \param axis Axis, based at the origin, around which to rotate - * \param angle Angle of rotation in degrees + * \param angle Angle of rotation in radians * * If the specificed axis is not unit length, the vector will be normalized. * diff --git a/src/matrix.c b/src/matrix.c index 569ff2d..8ae9c37 100644 --- a/src/matrix.c +++ b/src/matrix.c @@ -33,8 +33,6 @@ #define M_PI 3.14159265358979323846 #endif -#define DEG2RAD(d) ((d) * M_PI / 180.0) - const GLUmat4 gluIdentityMatrix = { { { { 1.0f, 0.0f, 0.0f, 0.0f } }, @@ -193,8 +191,8 @@ void gluPerspective4f(GLUmat4 *result, GLfloat fovy, GLfloat aspect, GLfloat n, GLfloat f) { - const double sine = sin(DEG2RAD(fovy / 2.0)); - const double cosine = cos(DEG2RAD(fovy / 2.0)); + const double sine = sin(fovy / 2.0); + const double cosine = cos(fovy / 2.0); const double sine_aspect = sine * aspect; const double dz = f - n; |