[PATCH] d3dx9/tests: Correct Fresnel reference term.

Alex Henrie alexhenrie24 at gmail.com
Fri Nov 3 13:10:31 CDT 2017


Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
---
Fixes test failure on 64-bit Linux.

The exact answer, without rounding error, was obtained by plugging the
following into Wolfram Alpha:

((0.5*((1.5*1.5+0.5*0.5-1)^0.5+0.5)-1)^2/(0.5*((1.5*1.5+0.5*0.5-1)^0.5-0.5)+1)^2+1)*0.5*((1.5*1.5+0.5*0.5-1)^0.5-0.5)^2/((1.5*1.5+0.5*0.5-1)^0.5+0.5)^2
---
 dlls/d3dx9_36/tests/math.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/d3dx9_36/tests/math.c b/dlls/d3dx9_36/tests/math.c
index ff3b098991..d8e1338b92 100644
--- a/dlls/d3dx9_36/tests/math.c
+++ b/dlls/d3dx9_36/tests/math.c
@@ -302,7 +302,7 @@ static void D3DXFresnelTest(void)
     BOOL equal;
 
     fresnel = D3DXFresnelTerm(0.5f, 1.5f);
-    equal = compare_float(fresnel, 8.91867056e-02f, 1);
+    equal = compare_float(fresnel, 8.91867128e-02f, 1);
     ok(equal, "Got unexpected Fresnel term %.8e.\n", fresnel);
 }
 
-- 
2.14.2




More information about the wine-patches mailing list