[D3DX9_36/WINED3D]
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Thu, 14 May 2015 10:00:37 +0000 (10:00 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Thu, 14 May 2015 10:00:37 +0000 (10:00 +0000)
- Remove useless copysignf invocation and the wrong defines for it
- BrokenHacksOnTopOfBrokenCode--;
- Should be sent upstream

svn path=/trunk/; revision=67709

reactos/dll/directx/wine/d3dx9_36/math.c
reactos/dll/directx/wine/wined3d/utils.c

index 2e11821..2229cb4 100644 (file)
 
 #include "d3dx9_36_private.h"
 
-#ifdef _MSC_VER
-#define copysignf(x, y) ((x) < 0.0f ? -fabsf(y) : fabsf(y))
-#endif
-
 struct ID3DXMatrixStackImpl
 {
   ID3DXMatrixStack ID3DXMatrixStack_iface;
@@ -2122,7 +2118,7 @@ unsigned short float_32_to_16(const float in)
 {
     int exp = 0, origexp;
     float tmp = fabsf(in);
-    int sign = (copysignf(1, in) < 0);
+    int sign = (in < 0);
     unsigned int mantissa;
     unsigned short ret;
 
index 2591e11..e7b56ce 100644 (file)
 
 #include "wined3d_private.h"
 
-#ifdef _MSC_VER
-#define copysignf(x, y) ((x) < 0.0f ? -fabsf(y) : fabsf(y))
-#endif
-
 WINE_DEFAULT_DEBUG_CHANNEL(d3d);
 
 struct wined3d_format_channels
@@ -3991,7 +3987,7 @@ void wined3d_ftoa(float value, char *s)
 {
     int idx = 1;
 
-    if (copysignf(1.0f, value) < 0.0f)
+    if (value < 0.0f)
         ++idx;
 
     /* Be sure to allocate a buffer of at least 17 characters for the result