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
ce319e9d
Commit
ce319e9d
authored
Sep 26, 2012
by
Rico Schüller
Committed by
Alexandre Julliard
Sep 26, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Use float functions in D3DXQuaternionSlerp().
parent
398eb275
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
17 deletions
+20
-17
math.c
dlls/d3dx9_36/math.c
+20
-17
No files found.
dlls/d3dx9_36/math.c
View file @
ce319e9d
...
...
@@ -1435,32 +1435,35 @@ D3DXQUATERNION* WINAPI D3DXQuaternionRotationYawPitchRoll(D3DXQUATERNION *pout,
return
pout
;
}
D3DXQUATERNION
*
WINAPI
D3DXQuaternionSlerp
(
D3DXQUATERNION
*
pout
,
CONST
D3DXQUATERNION
*
pq1
,
CONST
D3DXQUATERNION
*
pq2
,
FLOAT
t
)
D3DXQUATERNION
*
WINAPI
D3DXQuaternionSlerp
(
D3DXQUATERNION
*
out
,
const
D3DXQUATERNION
*
q1
,
const
D3DXQUATERNION
*
q2
,
FLOAT
t
)
{
FLOAT
dot
,
epsilon
,
temp
,
theta
,
u
;
FLOAT
dot
,
temp
;
TRACE
(
"
(%p, %p, %p, %f)
\n
"
,
pout
,
pq1
,
p
q2
,
t
);
TRACE
(
"
out %p, q1 %p, q2 %p, t %f
\n
"
,
out
,
q1
,
q2
,
t
);
epsilon
=
1
.
0
f
;
temp
=
1
.
0
f
-
t
;
u
=
t
;
dot
=
D3DXQuaternionDot
(
pq1
,
pq2
);
if
(
dot
<
0
.
0
f
)
dot
=
D3DXQuaternionDot
(
q1
,
q2
);
if
(
dot
<
0
.
0
f
)
{
epsilon
=
-
1
.
0
f
;
t
=
-
t
;
dot
=
-
dot
;
}
if
(
1
.
0
f
-
dot
>
0
.
001
f
)
if
(
1
.
0
f
-
dot
>
0
.
001
f
)
{
theta
=
acos
(
dot
);
temp
=
sin
(
theta
*
temp
)
/
sin
(
theta
);
u
=
sin
(
theta
*
u
)
/
sin
(
theta
);
FLOAT
theta
=
acosf
(
dot
);
temp
=
sinf
(
theta
*
temp
)
/
sinf
(
theta
);
t
=
sinf
(
theta
*
t
)
/
sinf
(
theta
);
}
pout
->
x
=
temp
*
pq1
->
x
+
epsilon
*
u
*
pq2
->
x
;
pout
->
y
=
temp
*
pq1
->
y
+
epsilon
*
u
*
pq2
->
y
;
pout
->
z
=
temp
*
pq1
->
z
+
epsilon
*
u
*
pq2
->
z
;
pout
->
w
=
temp
*
pq1
->
w
+
epsilon
*
u
*
pq2
->
w
;
return
pout
;
out
->
x
=
temp
*
q1
->
x
+
t
*
q2
->
x
;
out
->
y
=
temp
*
q1
->
y
+
t
*
q2
->
y
;
out
->
z
=
temp
*
q1
->
z
+
t
*
q2
->
z
;
out
->
w
=
temp
*
q1
->
w
+
t
*
q2
->
w
;
return
out
;
}
D3DXQUATERNION
*
WINAPI
D3DXQuaternionSquad
(
D3DXQUATERNION
*
pout
,
CONST
D3DXQUATERNION
*
pq1
,
CONST
D3DXQUATERNION
*
pq2
,
CONST
D3DXQUATERNION
*
pq3
,
CONST
D3DXQUATERNION
*
pq4
,
FLOAT
t
)
...
...
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