mirror of
https://github.com/reactos/reactos.git
synced 2024-08-19 09:59:44 +00:00
[WINE]
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:
parent
7d3bc17152
commit
e5251147ba
26
include/reactos/wine/math.h
Normal file
26
include/reactos/wine/math.h
Normal 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_ */
|
Loading…
Reference in a new issue