From: Nozomi Kodama Subject: d3dx9: Replace M_PI by its D3DX equivalent Message-Id: <1374583983.26052.YahooMailNeo@web28802.mail.ir2.yahoo.com> Date: Tue, 23 Jul 2013 13:53:03 +0100 (BST)
From 18e8881541d5303bb46ce73138852b76f7f4ea56 Mon Sep 17 00:00:00 2001 From: Nozomi Kodama Date: Mon, 22 Jul 2013 23:16:14 -1000 Subject: d3dx9: Replace M_PI by its D3DX equivalent --- dlls/d3dx9_36/mesh.c | 10 +++++----- dlls/d3dx9_36/tests/mesh.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c index f38a79e..11cd0a5 100644 --- a/dlls/d3dx9_36/mesh.c +++ b/dlls/d3dx9_36/mesh.c @@ -4629,8 +4629,8 @@ HRESULT WINAPI D3DXCreateSphere(struct IDirect3DDevice9 *device, float radius, U } /* phi = angle on xz plane wrt z axis */ - phi_step = -2 * M_PI / slices; - phi_start = M_PI / 2; + phi_step = -2 * D3DX_PI / slices; + phi_start = D3DX_PI / 2; if (!compute_sincos_table(&phi, phi_start, phi_step, slices)) { @@ -4641,7 +4641,7 @@ HRESULT WINAPI D3DXCreateSphere(struct IDirect3DDevice9 *device, float radius, U } /* theta = angle on xy plane wrt x axis */ - theta_step = M_PI / stacks; + theta_step = D3DX_PI / stacks; theta = theta_step; vertex = 0; @@ -4800,8 +4800,8 @@ HRESULT WINAPI D3DXCreateCylinder(struct IDirect3DDevice9 *device, float radius1 } /* theta = angle on xy plane wrt x axis */ - theta_step = -2 * M_PI / slices; - theta_start = M_PI / 2; + theta_step = -2 * D3DX_PI / slices; + theta_start = D3DX_PI / 2; if (!compute_sincos_table(&theta, theta_start, theta_step, slices)) { diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c index 0218000..01c66a8 100644 --- a/dlls/d3dx9_36/tests/mesh.c +++ b/dlls/d3dx9_36/tests/mesh.c @@ -2567,12 +2567,12 @@ static BOOL compute_sphere(struct mesh *mesh, FLOAT radius, UINT slices, UINT st int slice, stack; /* theta = angle on xy plane wrt x axis */ - theta_step = M_PI / stacks; + theta_step = D3DX_PI / stacks; theta_start = theta_step; /* phi = angle on xz plane wrt z axis */ - phi_step = -2 * M_PI / slices; - phi_start = M_PI / 2; + phi_step = -2 * D3DX_PI / slices; + phi_start = D3DX_PI / 2; if (!compute_sincos_table(&theta, theta_start, theta_step, stacks)) { @@ -2805,8 +2805,8 @@ static BOOL compute_cylinder(struct mesh *mesh, FLOAT radius1, FLOAT radius2, FL int slice, stack; /* theta = angle on xy plane wrt x axis */ - theta_step = -2 * M_PI / slices; - theta_start = M_PI / 2; + theta_step = -2 * D3DX_PI / slices; + theta_start = D3DX_PI / 2; if (!compute_sincos_table(&theta, theta_start, theta_step, slices)) { -- 1.8.1.4