Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
831d6b58
Commit
831d6b58
authored
Jul 17, 2009
by
David Adam
Committed by
Alexandre Julliard
Jul 17, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Fix D3DXQuaternionInverse to make tests pass in Windows.
parent
f59e41e8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
17 deletions
+12
-17
math.c
dlls/d3dx9_36/math.c
+8
-14
math.c
dlls/d3dx9_36/tests/math.c
+4
-3
No files found.
dlls/d3dx9_36/math.c
View file @
831d6b58
...
...
@@ -1182,23 +1182,17 @@ D3DXQUATERNION* WINAPI D3DXQuaternionExp(D3DXQUATERNION *pout, CONST D3DXQUATERN
D3DXQUATERNION
*
WINAPI
D3DXQuaternionInverse
(
D3DXQUATERNION
*
pout
,
CONST
D3DXQUATERNION
*
pq
)
{
D3DXQUATERNION
out
;
FLOAT
norm
;
norm
=
D3DXQuaternionLengthSq
(
pq
);
if
(
!
norm
)
{
pout
->
x
=
0
.
0
f
;
pout
->
y
=
0
.
0
f
;
pout
->
z
=
0
.
0
f
;
pout
->
w
=
0
.
0
f
;
}
else
{
pout
->
x
=
-
pq
->
x
/
norm
;
pout
->
y
=
-
pq
->
y
/
norm
;
pout
->
z
=
-
pq
->
z
/
norm
;
pout
->
w
=
pq
->
w
/
norm
;
}
out
.
x
=
-
pq
->
x
/
norm
;
out
.
y
=
-
pq
->
y
/
norm
;
out
.
z
=
-
pq
->
z
/
norm
;
out
.
w
=
pq
->
w
/
norm
;
*
pout
=
out
;
return
pout
;
}
...
...
dlls/d3dx9_36/tests/math.c
View file @
831d6b58
...
...
@@ -699,11 +699,12 @@ static void D3DXQuaternionTest(void)
expectedquat
.
x
=
-
1
.
0
f
/
121
.
0
f
;
expectedquat
.
y
=
-
2
.
0
f
/
121
.
0
f
;
expectedquat
.
z
=
-
4
.
0
f
/
121
.
0
f
;
expectedquat
.
w
=
10
.
0
f
/
121
.
0
f
;
D3DXQuaternionInverse
(
&
gotquat
,
&
q
);
expect_vec4
(
expectedquat
,
gotquat
);
/* test the null quaternion */
expectedquat
.
x
=
0
.
0
f
;
expectedquat
.
y
=
0
.
0
f
;
expectedquat
.
z
=
0
.
0
f
;
expectedquat
.
w
=
0
.
0
f
;
D3DXQuaternionInverse
(
&
gotquat
,
&
nul
);
expectedquat
.
x
=
1
.
0
f
;
expectedquat
.
y
=
2
.
0
f
;
expectedquat
.
z
=
4
.
0
f
;
expectedquat
.
w
=
1
0
.
0
f
;
D3DXQuaternionInverse
(
&
gotquat
,
&
gotquat
);
expect_vec4
(
expectedquat
,
gotquat
);
/*_______________D3DXQuaternionIsIdentity________________*/
s
.
x
=
0
.
0
f
;
s
.
y
=
0
.
0
f
;
s
.
z
=
0
.
0
f
;
s
.
w
=
1
.
0
f
;
expectedbool
=
TRUE
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment