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
d882ee27
Commit
d882ee27
authored
Apr 19, 2007
by
David Adam
Committed by
Alexandre Julliard
Apr 23, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3drm: Implement D3DRMVectorModulus.
parent
de77d8e9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
d3drm.spec
dlls/d3drm/d3drm.spec
+1
-1
math.c
dlls/d3drm/math.c
+8
-0
vector.c
dlls/d3drm/tests/vector.c
+4
-0
No files found.
dlls/d3drm/d3drm.spec
View file @
d882ee27
...
...
@@ -11,7 +11,7 @@
@ stdcall D3DRMVectorAdd(ptr ptr ptr)
@ stdcall D3DRMVectorCrossProduct(ptr ptr ptr)
@ stdcall D3DRMVectorDotProduct(ptr ptr)
@ st
ub D3DRMVectorModulus
@ st
dcall D3DRMVectorModulus(ptr)
@ stub D3DRMVectorNormalize
@ stub D3DRMVectorRandom
@ stub D3DRMVectorReflect
...
...
dlls/d3drm/math.c
View file @
d882ee27
...
...
@@ -66,3 +66,11 @@ D3DVALUE WINAPI D3DRMVectorDotProduct(LPD3DVECTOR s1, LPD3DVECTOR s2)
dot_product
=
s1
->
x
*
s2
->
x
+
s1
->
y
*
s2
->
y
+
s1
->
z
*
s2
->
z
;
return
dot_product
;
}
/* Norm of a vector */
D3DVALUE
WINAPI
D3DRMVectorModulus
(
LPD3DVECTOR
v
)
{
D3DVALUE
result
;
result
=
sqrt
(
v
->
x
*
v
->
x
+
v
->
y
*
v
->
y
+
v
->
z
*
v
->
z
);
return
result
;
}
dlls/d3drm/tests/vector.c
View file @
d882ee27
...
...
@@ -56,6 +56,10 @@ void VectorTest(void)
/*_______________________VectorDotProduct__________________________*/
mod
=
D3DRMVectorDotProduct
(
&
u
,
&
v
);
ok
((
mod
==
16
.
0
),
"Expected 16.0, Got %f"
,
mod
);
/*_______________________VectorModulus_____________________________*/
mod
=
D3DRMVectorModulus
(
&
u
);
ok
((
mod
==
3
.
0
),
"Expected 3.0, Got %f"
,
mod
);
}
START_TEST
(
vector
)
...
...
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