X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=dosdemo;a=blobdiff_plain;f=libs%2Fcgmath%2Fcgmquat.inl;h=743d818ab4670a894cac0c185e0f9d5e922ba833;hp=4b29fd26707dd5c98171c72e88b01132b2e78ac9;hb=0d5155d4bb78c145268a4b1d2a327fc5e14eb0ef;hpb=80ffa1d4b9436c6cd0a71089434f8c2acf738b16 diff --git a/libs/cgmath/cgmquat.inl b/libs/cgmath/cgmquat.inl index 4b29fd2..743d818 100644 --- a/libs/cgmath/cgmquat.inl +++ b/libs/cgmath/cgmquat.inl @@ -98,20 +98,20 @@ static inline void cgm_qinvert(cgm_quat *q) } } -static inline void cgm_qrotation(cgm_quat *q, const cgm_vec3 *axis, float angle) +static inline void cgm_qrotation(cgm_quat *q, float angle, float x, float y, float z) { float hangle = angle * 0.5f; float sin_ha = sin(hangle); q->w = cos(hangle); - q->x = axis->x * sin_ha; - q->y = axis->y * sin_ha; - q->z = axis->z * sin_ha; + q->x = x * sin_ha; + q->y = y * sin_ha; + q->z = z * sin_ha; } -static inline void cgm_qrotate(cgm_quat *q, const cgm_vec3 *axis, float angle) +static inline void cgm_qrotate(cgm_quat *q, float angle, float x, float y, float z) { cgm_quat qrot; - cgm_qrotation(&qrot, axis, angle); + cgm_qrotation(&qrot, angle, x, y, z); cgm_qmul(q, &qrot); }