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
a0ddecf7
Commit
a0ddecf7
authored
Oct 14, 2007
by
David Adam
Committed by
Alexandre Julliard
Oct 16, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx8: Implement D3DXVec2CCW with a test.
parent
1fa3abe7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
0 deletions
+19
-0
math.c
dlls/d3dx8/tests/math.c
+12
-0
d3dx8math.h
include/d3dx8math.h
+1
-0
d3dx8math.inl
include/d3dx8math.inl
+6
-0
No files found.
dlls/d3dx8/tests/math.c
View file @
a0ddecf7
...
@@ -32,6 +32,18 @@ static void D3X8Vector2Test(void)
...
@@ -32,6 +32,18 @@ static void D3X8Vector2Test(void)
u
.
x
=
3
.
0
f
;
u
.
y
=
4
.
0
f
;
u
.
x
=
3
.
0
f
;
u
.
y
=
4
.
0
f
;
v
.
x
=-
7
.
0
f
;
v
.
y
=
9
.
0
f
;
v
.
x
=-
7
.
0
f
;
v
.
y
=
9
.
0
f
;
/*_______________D3DXVec2CCW__________________________*/
expected
=
55
.
0
f
;
got
=
D3DXVec2CCW
(
&
u
,
&
v
);
ok
(
fabs
(
got
-
expected
)
<
admitted_error
,
"Expected: %f, Got: %f
\n
"
,
expected
,
got
);
/* Tests the case NULL */
expected
=
0
.
0
f
;
got
=
D3DXVec2CCW
(
NULL
,
&
v
);
ok
(
fabs
(
got
-
expected
)
<
admitted_error
,
"Expected: %f, Got: %f
\n
"
,
expected
,
got
);
expected
=
0
.
0
f
;
got
=
D3DXVec2CCW
(
NULL
,
NULL
);
ok
(
fabs
(
got
-
expected
)
<
admitted_error
,
"Expected: %f, Got: %f
\n
"
,
expected
,
got
);
/*_______________D3DXVec2Dot__________________________*/
/*_______________D3DXVec2Dot__________________________*/
expected
=
15
.
0
f
;
expected
=
15
.
0
f
;
got
=
D3DXVec2Dot
(
&
u
,
&
v
);
got
=
D3DXVec2Dot
(
&
u
,
&
v
);
...
...
include/d3dx8math.h
View file @
a0ddecf7
...
@@ -58,6 +58,7 @@ typedef struct D3DXCOLOR
...
@@ -58,6 +58,7 @@ typedef struct D3DXCOLOR
FLOAT
r
,
g
,
b
,
a
;
FLOAT
r
,
g
,
b
,
a
;
}
D3DXCOLOR
,
*
LPD3DXCOLOR
;
}
D3DXCOLOR
,
*
LPD3DXCOLOR
;
FLOAT
D3DXVec2CCW
(
CONST
D3DXVECTOR2
*
pv1
,
CONST
D3DXVECTOR2
*
pv2
);
FLOAT
D3DXVec2Dot
(
CONST
D3DXVECTOR2
*
pv1
,
CONST
D3DXVECTOR2
*
pv2
);
FLOAT
D3DXVec2Dot
(
CONST
D3DXVECTOR2
*
pv1
,
CONST
D3DXVECTOR2
*
pv2
);
FLOAT
D3DXVec2Length
(
CONST
D3DXVECTOR2
*
pv
);
FLOAT
D3DXVec2Length
(
CONST
D3DXVECTOR2
*
pv
);
FLOAT
D3DXVec2LengthSq
(
CONST
D3DXVECTOR2
*
pv
);
FLOAT
D3DXVec2LengthSq
(
CONST
D3DXVECTOR2
*
pv
);
...
...
include/d3dx8math.inl
View file @
a0ddecf7
...
@@ -19,6 +19,12 @@
...
@@ -19,6 +19,12 @@
#ifndef __D3DX8MATH_INL__
#ifndef __D3DX8MATH_INL__
#define __D3DX8MATH_INL__
#define __D3DX8MATH_INL__
extern inline FLOAT D3DXVec2CCW(CONST D3DXVECTOR2 *pv1, CONST D3DXVECTOR2 *pv2)
{
if ( !pv1 || !pv2) return 0.0f;
return ( (pv1->x) * (pv2->y) - (pv1->y) * (pv2->x) );
}
extern inline FLOAT D3DXVec2Dot(CONST D3DXVECTOR2 *pv1, CONST D3DXVECTOR2 *pv2)
extern inline FLOAT D3DXVec2Dot(CONST D3DXVECTOR2 *pv1, CONST D3DXVECTOR2 *pv2)
{
{
if ( !pv1 || !pv2) return 0.0f;
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