mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 03:08:05 +02:00
util/u_math: Define NAN/INFINITY macros for MSVC.
Untested. But should hopefully fix the build.
This commit is contained in:
parent
f59cb67376
commit
b844c8e039
1 changed files with 4 additions and 0 deletions
|
|
@ -48,6 +48,7 @@ extern "C" {
|
|||
|
||||
|
||||
#include <math.h>
|
||||
#include <float.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#ifdef PIPE_OS_UNIX
|
||||
|
|
@ -133,6 +134,9 @@ roundf(float x)
|
|||
return x >= 0.0f ? floorf(x + 0.5f) : ceilf(x - 0.5f);
|
||||
}
|
||||
|
||||
#define INFINITY (DBL_MAX + DBL_MAX)
|
||||
#define NAN (INFINITY - INFINITY)
|
||||
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue