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
a394fef4
Commit
a394fef4
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 D3DXVec3Cross.
parent
96576118
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
math.c
dlls/d3dx8/tests/math.c
+9
-0
d3dx8math.inl
include/d3dx8math.inl
+9
-0
No files found.
dlls/d3dx8/tests/math.c
View file @
a394fef4
...
...
@@ -203,6 +203,15 @@ static void D3X8Vector3Test(void)
funcpointer
=
D3DXVec3Add
(
NULL
,
NULL
,
NULL
);
ok
(
funcpointer
==
NULL
,
"Expected: %p, Got: %p
\n
"
,
NULL
,
funcpointer
);
/*_______________D3DXVec3Cross________________________*/
expectedvec
.
x
=
-
18
.
0
f
;
expectedvec
.
y
=
40
.
0
f
;
expectedvec
.
z
=
-
30
.
0
f
;
D3DXVec3Cross
(
&
gotvec
,
&
u
,
&
v
);
/* Tests the case NULL */
funcpointer
=
D3DXVec3Cross
(
&
gotvec
,
NULL
,
&
v
);
ok
(
funcpointer
==
NULL
,
"Expected: %p, Got: %p
\n
"
,
NULL
,
funcpointer
);
funcpointer
=
D3DXVec3Cross
(
NULL
,
NULL
,
NULL
);
ok
(
funcpointer
==
NULL
,
"Expected: %p, Got: %p
\n
"
,
NULL
,
funcpointer
);
/*_______________D3DXVec3Dot__________________________*/
expected
=
-
8
.
0
f
;
got
=
D3DXVec3Dot
(
&
u
,
&
v
);
...
...
include/d3dx8math.inl
View file @
a394fef4
...
...
@@ -104,6 +104,15 @@ static inline D3DXVECTOR3* D3DXVec3Add(D3DXVECTOR3 *pout, CONST D3DXVECTOR3 *pv1
return pout;
}
static inline D3DXVECTOR3* D3DXVec3Cross(D3DXVECTOR3 *pout, CONST D3DXVECTOR3 *pv1, CONST D3DXVECTOR3 *pv2)
{
if ( !pout || !pv1 || !pv2) return NULL;
pout->x = (pv1->y) * (pv2->z) - (pv1->z) * (pv2->y);
pout->y = (pv1->z) * (pv2->x) - (pv1->x) * (pv2->z);
pout->z = (pv1->x) * (pv2->y) - (pv1->y) * (pv2->x);
return pout;
}
static inline FLOAT D3DXVec3Dot(CONST D3DXVECTOR3 *pv1, CONST D3DXVECTOR3 *pv2)
{
if ( !pv1 || !pv2 ) 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