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
7c5d93b5
Commit
7c5d93b5
authored
Sep 21, 2012
by
Nozomi Kodama
Committed by
Alexandre Julliard
Sep 25, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Simplify D3DXVector*Normalize.
parent
10d12539
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
20 deletions
+16
-20
math.c
dlls/d3dx9_36/math.c
+16
-20
No files found.
dlls/d3dx9_36/math.c
View file @
7c5d93b5
...
...
@@ -1588,7 +1588,6 @@ D3DXVECTOR2* WINAPI D3DXVec2Hermite(D3DXVECTOR2 *pout, CONST D3DXVECTOR2 *pv1, C
D3DXVECTOR2
*
WINAPI
D3DXVec2Normalize
(
D3DXVECTOR2
*
pout
,
CONST
D3DXVECTOR2
*
pv
)
{
D3DXVECTOR2
out
;
FLOAT
norm
;
TRACE
(
"(%p, %p)
\n
"
,
pout
,
pv
);
...
...
@@ -1596,15 +1595,15 @@ D3DXVECTOR2* WINAPI D3DXVec2Normalize(D3DXVECTOR2 *pout, CONST D3DXVECTOR2 *pv)
norm
=
D3DXVec2Length
(
pv
);
if
(
!
norm
)
{
out
.
x
=
0
.
0
f
;
out
.
y
=
0
.
0
f
;
pout
->
x
=
0
.
0
f
;
pout
->
y
=
0
.
0
f
;
}
else
{
out
.
x
=
pv
->
x
/
norm
;
out
.
y
=
pv
->
y
/
norm
;
pout
->
x
=
pv
->
x
/
norm
;
pout
->
y
=
pv
->
y
/
norm
;
}
*
pout
=
out
;
return
pout
;
}
...
...
@@ -1729,7 +1728,6 @@ D3DXVECTOR3* WINAPI D3DXVec3Hermite(D3DXVECTOR3 *pout, CONST D3DXVECTOR3 *pv1, C
D3DXVECTOR3
*
WINAPI
D3DXVec3Normalize
(
D3DXVECTOR3
*
pout
,
CONST
D3DXVECTOR3
*
pv
)
{
D3DXVECTOR3
out
;
FLOAT
norm
;
TRACE
(
"(%p, %p)
\n
"
,
pout
,
pv
);
...
...
@@ -1737,17 +1735,17 @@ D3DXVECTOR3* WINAPI D3DXVec3Normalize(D3DXVECTOR3 *pout, CONST D3DXVECTOR3 *pv)
norm
=
D3DXVec3Length
(
pv
);
if
(
!
norm
)
{
out
.
x
=
0
.
0
f
;
out
.
y
=
0
.
0
f
;
out
.
z
=
0
.
0
f
;
pout
->
x
=
0
.
0
f
;
pout
->
y
=
0
.
0
f
;
pout
->
z
=
0
.
0
f
;
}
else
{
out
.
x
=
pv
->
x
/
norm
;
out
.
y
=
pv
->
y
/
norm
;
out
.
z
=
pv
->
z
/
norm
;
pout
->
x
=
pv
->
x
/
norm
;
pout
->
y
=
pv
->
y
/
norm
;
pout
->
z
=
pv
->
z
/
norm
;
}
*
pout
=
out
;
return
pout
;
}
...
...
@@ -1965,19 +1963,17 @@ D3DXVECTOR4* WINAPI D3DXVec4Hermite(D3DXVECTOR4 *pout, CONST D3DXVECTOR4 *pv1, C
D3DXVECTOR4
*
WINAPI
D3DXVec4Normalize
(
D3DXVECTOR4
*
pout
,
CONST
D3DXVECTOR4
*
pv
)
{
D3DXVECTOR4
out
;
FLOAT
norm
;
TRACE
(
"(%p, %p)
\n
"
,
pout
,
pv
);
norm
=
D3DXVec4Length
(
pv
);
out
.
x
=
pv
->
x
/
norm
;
out
.
y
=
pv
->
y
/
norm
;
out
.
z
=
pv
->
z
/
norm
;
out
.
w
=
pv
->
w
/
norm
;
pout
->
x
=
pv
->
x
/
norm
;
pout
->
y
=
pv
->
y
/
norm
;
pout
->
z
=
pv
->
z
/
norm
;
pout
->
w
=
pv
->
w
/
norm
;
*
pout
=
out
;
return
pout
;
}
...
...
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