mirror of
https://github.com/recp/cglm.git
synced 2026-02-17 03:39:05 +00:00
conjugate of quaternion
This commit is contained in:
@@ -182,6 +182,20 @@ glm_quat_mulv(versor q1, versor q2, versor dest) {
|
|||||||
glm_quat_normalize(dest);
|
glm_quat_normalize(dest);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief conjugate of quaternion
|
||||||
|
*
|
||||||
|
* @param[in] q quaternion
|
||||||
|
* @param[out] dest conjugate
|
||||||
|
*/
|
||||||
|
CGLM_INLINE
|
||||||
|
void
|
||||||
|
glm_quat_conjugate(versor q, versor dest) {
|
||||||
|
glm_vec4_copy(q, dest);
|
||||||
|
glm_vec4_flipsign(dest);
|
||||||
|
dest[3] = -dest[3];
|
||||||
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief convert quaternion to mat4
|
* @brief convert quaternion to mat4
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user