projects
/
dosdemo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
updated cgmath
[dosdemo]
/
libs
/
cgmath
/
cgmquat.inl
diff --git
a/libs/cgmath/cgmquat.inl
b/libs/cgmath/cgmquat.inl
index
4b29fd2
..
743d818
100644
(file)
--- 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);
{
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_quat qrot;
- cgm_qrotation(&qrot, axis, angle);
+ cgm_qrotation(&qrot, angle, x, y, z);
cgm_qmul(q, &qrot);
}
cgm_qmul(q, &qrot);
}