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
77f5d4c8
Commit
77f5d4c8
authored
Oct 18, 2007
by
David Adam
Committed by
Alexandre Julliard
Oct 22, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx8: Implement D3DXQuaternionConjugate.
parent
a394fef4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletion
+23
-1
math.c
dlls/d3dx8/tests/math.c
+13
-1
d3dx8math.inl
include/d3dx8math.inl
+10
-0
No files found.
dlls/d3dx8/tests/math.c
View file @
77f5d4c8
...
...
@@ -32,12 +32,24 @@
static
void
D3X8QuaternionTest
(
void
)
{
D3DXQUATERNION
q
,
r
;
D3DXQUATERNION
expectedquat
,
gotquat
,
q
,
r
;
LPD3DXQUATERNION
funcpointer
;
FLOAT
expected
,
got
;
q
.
x
=
1
.
0
f
,
q
.
y
=
2
.
0
f
;
q
.
z
=
4
.
0
f
;
q
.
w
=
10
.
0
f
;
r
.
x
=
-
3
.
0
f
;
r
.
y
=
4
.
0
f
;
r
.
z
=
-
5
.
0
f
;
r
.
w
=
7
.
0
;
/*_______________D3DXQuaternionConjugate________________*/
expectedquat
.
x
=
-
1
.
0
f
;
expectedquat
.
y
=
-
2
.
0
f
;
expectedquat
.
z
=
-
4
.
0
f
;
expectedquat
.
w
=
10
.
0
f
;
D3DXQuaternionConjugate
(
&
gotquat
,
&
q
);
expect_vec4
(
expectedquat
,
gotquat
);
/* Test the NULL case */
funcpointer
=
D3DXQuaternionConjugate
(
&
gotquat
,
NULL
);
ok
(
funcpointer
==
NULL
,
"Expected: %p, Got: %p
\n
"
,
NULL
,
funcpointer
);
funcpointer
=
D3DXQuaternionConjugate
(
NULL
,
NULL
);
ok
(
funcpointer
==
NULL
,
"Expected: %p, Got: %p
\n
"
,
NULL
,
funcpointer
);
/*_______________D3DXQuaternionDot______________________*/
expected
=
55
.
0
f
;
got
=
D3DXQuaternionDot
(
&
q
,
&
r
);
...
...
include/d3dx8math.inl
View file @
77f5d4c8
...
...
@@ -258,6 +258,16 @@ static inline D3DXVECTOR4* D3DXVec4Subtract(D3DXVECTOR4 *pout, CONST D3DXVECTOR4
/*__________________D3DXQUATERNION____________________*/
static inline D3DXQUATERNION* D3DXQuaternionConjugate(D3DXQUATERNION *pout, CONST D3DXQUATERNION *pq)
{
if ( !pout || !pq) return NULL;
pout->x = -pq->x;
pout->y = -pq->y;
pout->z = -pq->z;
pout->w = pq->w;
return pout;
}
static inline FLOAT D3DXQuaternionDot(CONST D3DXQUATERNION *pq1, CONST D3DXQUATERNION *pq2)
{
if ( !pq1 || !pq2 ) return 0.0f;
...
...
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