Add math.h for wine code, with NAN and INFINITY as portable constants.

svn path=/branches/cmake-bringup/; revision=50731
This commit is contained in:
Timo Kreuzer 2011-02-16 12:53:21 +00:00
parent 7d3bc17152
commit e5251147ba

View file

@ -0,0 +1,26 @@
#ifndef __WINE_MATH_H_
#define __WINE_MATH_H_
#include <crt/math.h>
#ifdef _MSC_VER
__forceinline float _NaN()
{
unsigned long NaN = 0x7fc00000;
return *(float*)&NaN;
}
#define NAN _NaN()
__forceinline float _Infinity()
{
unsigned long Infinity = 0x7f800000;
return *(float*)&Infinity;
}
#define INFINITY _Infinity()
#else
#define NAN (0.0f / 0.0f)
#define INFINITY (1.0F/0.0F)
#endif
#endif /* __WINE_MATH_H_ */