Reviewed-by: Matt Turner <mattst88@gmail.com>
-/**********************************************************************
- * Math macros
- */
-
-/* Degrees to radians conversion: */
-#define DEG2RAD (M_PI/180.0)
-
-
#if defined(_MSC_VER)
#if _MSC_VER < 1800 /* Not req'd on VS2013 and above */
#define strtoll(p, e, b) _strtoi64(p, e, b)
return;
FLUSH_VERTICES(ctx, _NEW_LIGHT);
light->SpotCutoff = params[0];
- light->_CosCutoff = (GLfloat) (cos(light->SpotCutoff * DEG2RAD));
+ light->_CosCutoff = (GLfloat) (cos(light->SpotCutoff * M_PI / 180.0));
if (light->_CosCutoff < 0)
light->_CosCutoff = 0;
if (light->SpotCutoff != 180.0F)
GLfloat m[16];
GLboolean optimized;
- s = (GLfloat) sin( angle * DEG2RAD );
- c = (GLfloat) cos( angle * DEG2RAD );
+ s = (GLfloat) sin( angle * M_PI / 180.0 );
+ c = (GLfloat) cos( angle * M_PI / 180.0 );
memcpy(m, Identity, sizeof(GLfloat)*16);
optimized = GL_FALSE;