mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[INCLUDES]
- Move NAN and INFINITY definition from wine/math.h to wine/port.h - Delete wine/math.h - Fix build svn path=/trunk/; revision=57122
This commit is contained in:
parent
ac27322cee
commit
3023aa795c
3 changed files with 19 additions and 26 deletions
|
@ -37,6 +37,7 @@
|
|||
#include "winuser.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include "objbase.h"
|
||||
#include "wine/wined3d.h"
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
#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_ */
|
|
@ -151,6 +151,24 @@ struct statfs;
|
|||
#define M_PI_4 0.785398163397448309616
|
||||
#endif
|
||||
|
||||
#ifndef INFINITY
|
||||
static inline float __port_infinity(void)
|
||||
{
|
||||
static const unsigned __inf_bytes = 0x7f800000;
|
||||
return *(const float *)&__inf_bytes;
|
||||
}
|
||||
#define INFINITY __port_infinity()
|
||||
#endif
|
||||
|
||||
#ifndef NAN
|
||||
static inline float __port_nan(void)
|
||||
{
|
||||
static const unsigned __nan_bytes = 0x7fc00000;
|
||||
return *(const float *)&__nan_bytes;
|
||||
}
|
||||
#define NAN __port_nan()
|
||||
#endif
|
||||
|
||||
/* Constructor functions */
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
|
Loading…
Reference in a new issue