projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Updating last edit time and FreeGLUT version for API document
[freeglut]
/
progs
/
demos
/
spaceball
/
vmath.c
diff --git
a/progs/demos/spaceball/vmath.c
b/progs/demos/spaceball/vmath.c
index
f4eb50f
..
7ef3c25
100644
(file)
--- a/
progs/demos/spaceball/vmath.c
+++ b/
progs/demos/spaceball/vmath.c
@@
-3,14
+3,14
@@
\r
quat_t quat_rotate(quat_t q, float angle, float x, float y, float z)
\r
{
\r
\r
quat_t quat_rotate(quat_t q, float angle, float x, float y, float z)
\r
{
\r
- quat_t rq;
\r
- float half_angle = angle * 0.5;
\r
- float sin_half = sin(half_angle);
\r
+ quat_t rq;
\r
+ float half_angle = angle * 0.5f;
\r
+ float sin_half = (float)sin(half_angle);
\r
\r
\r
- rq.w = cos(half_angle);
\r
- rq.x = x * sin_half;
\r
- rq.y = y * sin_half;
\r
- rq.z = z * sin_half;
\r
+ rq.w = (float)cos(half_angle);
\r
+ rq.x = x * sin_half;
\r
+ rq.y = y * sin_half;
\r
+ rq.z = z * sin_half;
\r
\r
\r
- return quat_mul(q, rq);
\r
+ return quat_mul(q, rq);
\r
}
\r
}
\r