diff options
author | marha <marha@users.sourceforge.net> | 2012-09-04 15:49:46 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-09-04 15:49:46 +0200 |
commit | f2c10b20ce3f657c1f2013057602bb439816940f (patch) | |
tree | 4f86053b9b636d2d0174e229e79f2bb9d0a6f1a7 /mesalib/src/mesa/main/imports.h | |
parent | b3bc6204173252cae91fd40659c0eb01e4c75c99 (diff) | |
parent | 67c4614f29188e4af86e1d88ee82759c896b70b5 (diff) | |
download | vcxsrv-f2c10b20ce3f657c1f2013057602bb439816940f.tar.gz vcxsrv-f2c10b20ce3f657c1f2013057602bb439816940f.tar.bz2 vcxsrv-f2c10b20ce3f657c1f2013057602bb439816940f.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
libxcb/src/xcb_ext.c
libxcb/src/xcb_xid.c
mesalib/src/mesa/main/.gitignore
mesalib/src/mesa/main/eval.c
mesalib/src/mesa/main/imports.h
mesalib/src/mesa/main/macros.h
Diffstat (limited to 'mesalib/src/mesa/main/imports.h')
-rw-r--r-- | mesalib/src/mesa/main/imports.h | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/mesalib/src/mesa/main/imports.h b/mesalib/src/mesa/main/imports.h index 2f854e574..abf216c99 100644 --- a/mesalib/src/mesa/main/imports.h +++ b/mesalib/src/mesa/main/imports.h @@ -96,18 +96,6 @@ typedef union { GLfloat f; GLint i; } fi_type; #define DEG2RAD (M_PI/180.0) -/*** - *** SQRTF: single-precision square root - ***/ -#define SQRTF(X) (float) sqrt((float) (X)) - - -/*** - *** INV_SQRTF: single-precision inverse square root - ***/ -#define INV_SQRTF(X) (1.0F / SQRTF(X)) - - /** * \name Work-arounds for platforms that lack C99 math functions */ @@ -156,9 +144,15 @@ static inline int isblank(int ch) { return ch == ' ' || ch == '\t'; } #endif /*@}*/ -#if defined(__SUNPRO_C) -#define sqrtf(f) ((float) sqrt(f)) -#endif + + +/** single-precision inverse square root */ +static inline float +INV_SQRTF(float x) +{ + /* XXX we could try Quake's fast inverse square root function here */ + return 1.0F / sqrtf(x); +} /*** |