Compute quaternion rotating a vector into another

Both `vec3` inputs should be of unit length; returns a unit quaternion.
This commit is contained in:
Sundaram Ramaswamy
2021-06-10 22:53:28 +05:30
parent 8b958e9600
commit b5802b99b2
4 changed files with 61 additions and 2 deletions

View File

@@ -44,6 +44,12 @@ glmc_quat_copy(versor q, versor dest) {
glm_quat_copy(q, dest);
}
CGLM_EXPORT
void
glmc_quat_from_vecs(vec3 a, vec3 b, versor dest) {
glm_quat_from_vecs(a, b, dest);
}
CGLM_EXPORT
float
glmc_quat_norm(versor q) {