X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=progs%2Fdemos%2Fspaceball%2Fvmath.c;h=7ef3c25e737f9d65857afce24a9f9d66178d501f;hb=85fe5ac7b6efe580eab22820aa740a4b2dcafb0c;hp=f4eb50fab504191293c5eccda9d6d6f4c361c5e4;hpb=bb97ecab3add22cf774d3bb8bdb9d1be537cc524;p=freeglut diff --git a/progs/demos/spaceball/vmath.c b/progs/demos/spaceball/vmath.c index f4eb50f..7ef3c25 100644 --- a/progs/demos/spaceball/vmath.c +++ b/progs/demos/spaceball/vmath.c @@ -3,14 +3,14 @@ quat_t quat_rotate(quat_t q, float angle, float x, float y, float z) { - quat_t rq; - float half_angle = angle * 0.5; - float sin_half = sin(half_angle); + quat_t rq; + float half_angle = angle * 0.5f; + float sin_half = (float)sin(half_angle); - rq.w = cos(half_angle); - rq.x = x * sin_half; - rq.y = y * sin_half; - rq.z = z * sin_half; + rq.w = (float)cos(half_angle); + rq.x = x * sin_half; + rq.y = y * sin_half; + rq.z = z * sin_half; - return quat_mul(q, rq); + return quat_mul(q, rq); }