no longer using sinf/cosfsqrtf in fg_geometry, no need for all this

extra boilerplate


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1319 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
dcnieho 2012-05-21 09:36:23 +00:00
parent 0b0d17fa8e
commit 6afd5d5a83
3 changed files with 4 additions and 21 deletions

View File

@ -245,9 +245,6 @@ CHECK_INCLUDE_FILES(sys/ioctl.h HAVE_SYS_IOCTL_H)
CHECK_INCLUDE_FILES(fcntl.h HAVE_FCNTL_H)
CHECK_INCLUDE_FILES(errno.h HAVE_ERRNO_H)
CHECK_INCLUDE_FILES(usbhid.h HAVE_USBHID_H)
CHECK_FUNCTION_EXISTS(sinf HAVE_SINF)
CHECK_FUNCTION_EXISTS(cosf HAVE_COSF)
CHECK_FUNCTION_EXISTS(sqrtf HAVE_SQRTF)
CHECK_FUNCTION_EXISTS(gettimeofday HAVE_GETTIMEOFDAY)
CHECK_FUNCTION_EXISTS(vfprintf HAVE_VFPRINTF)
CHECK_FUNCTION_EXISTS(_doprnt HAVE_DOPRNT)

View File

@ -13,9 +13,6 @@
#cmakedefine HAVE_GETTIMEOFDAY
#cmakedefine HAVE_VFPRINTF
#cmakedefine HAVE_DOPRNT
#cmakedefine HAVE_SINF
#cmakedefine HAVE_COSF
#cmakedefine HAVE_SQRTF
#cmakedefine NEED_XPARSEGEOMETRY_IMPL
#cmakedefine HAVE_STDINT_H
#cmakedefine HAVE_INTTYPES_H

View File

@ -30,17 +30,6 @@
#include "fg_gl2.h"
#include <math.h>
/* VC++6 in C mode doesn't have C99's sinf/cos/sqrtf */
#ifndef HAVE_SINF
#define sinf(x) (float)sin((double)(x))
#endif
#ifndef HAVE_COSF
#define cosf(x) (float)cos((double)(x))
#endif
#ifndef HAVE_SQRTF
#define sqrtf(x) (float)sqrt((double)(x))
#endif
/* declare for drawing using the different OpenGL versions here so we can
have a nice code order below */
#ifndef GL_ES_VERSION_2_0
@ -987,8 +976,8 @@ static void fghCircleTable(GLfloat **sint, GLfloat **cost, const int n, const GL
for (i=1; i<size; i++)
{
(*sint)[i] = sinf(angle*i);
(*cost)[i] = cosf(angle*i);
(*sint)[i] = (GLfloat)sin(angle*i);
(*cost)[i] = (GLfloat)cos(angle*i);
}
@ -1106,8 +1095,8 @@ void fghGenerateCone(
const GLfloat rStep = (GLfloat)base / ( ( stacks > 0 ) ? stacks : 1 );
/* Scaling factors for vertex normals */
const GLfloat cosn = ( (GLfloat)height / sqrtf( height * height + base * base ));
const GLfloat sinn = ( (GLfloat)base / sqrtf( height * height + base * base ));
const GLfloat cosn = (GLfloat) (height / sqrt( height * height + base * base ));
const GLfloat sinn = (GLfloat) (base / sqrt( height * height + base * base ));