simplify CEILF, FLOORF, FABSF stuff

This commit is contained in:
Brian Paul 2003-04-03 20:34:38 +00:00
parent 0983163fde
commit bb5ebf1724

View file

@ -1,4 +1,4 @@
/* $Id: imports.h,v 1.19 2003/03/17 15:13:43 brianp Exp $ */
/* $Id: imports.h,v 1.20 2003/04/03 20:34:38 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -272,22 +272,19 @@ static INLINE int IS_INF_OR_NAN( float x )
*** FLOORF: floor of float
*** FABSF: absolute value of float
***/
#if defined(__sparc__) || defined(__NeXT__) /* XXX improve? */
#define CEILF(x) ceil(x)
#define FLOORF(x) floor(x)
#define FABSF(x) fabs(x)
#elif defined(__WIN32__) || defined(__IBMC__) || defined(__IBMCPP__)
#define CEILF(x) ((GLfloat) ceil(x))
#define FLOORF(x) ((GLfloat) floor(x))
#define FABSF(x) ((GLfloat) fabs(x))
#elif defined(XFree86LOADER) && defined(IN_MODULE)
#if defined(XFree86LOADER) && defined(IN_MODULE)
#define CEILF(x) ((GLfloat) xf86ceil(x))
#define FLOORF(x) ((GLfloat) xf86floor(x))
#define FABSF(x) ((GLfloat) xf86fabs(x))
#else
#elif defined(__gnu_linux__)
/* C99 functions */
#define CEILF(x) ceilf(x)
#define FLOORF(x) floorf(x)
#define FABSF(x) fabsf(x)
#else
#define CEILF(x) ((GLfloat) ceil(x))
#define FLOORF(x) ((GLfloat) floor(x))
#define FABSF(x) ((GLfloat) fabs(x))
#endif