4 quat_t quat_rotate(quat_t q, float angle, float x, float y, float z)
\r
7 float half_angle = angle * 0.5;
\r
8 float sin_half = sin(half_angle);
\r
10 rq.w = cos(half_angle);
\r
11 rq.x = x * sin_half;
\r
12 rq.y = y * sin_half;
\r
13 rq.z = z * sin_half;
\r
15 return quat_mul(q, rq);
\r