Use scale for both cases

This commit is contained in:
Sundaram Ramaswamy
2021-05-06 23:47:03 +05:30
parent d6b93f052e
commit f19ff5d064

View File

@@ -644,10 +644,7 @@ void
glm_quat_nlerp(versor from, versor to, float t, versor dest) {
float dot = glm_vec4_dot(from, to);
versor target;
if (dot >= 0)
glm_quat_copy(to, target);
else
glm_vec4_negate_to(to, target);
glm_vec4_scale(to, (dot >= 0) ? 1 : -1, target);
glm_quat_lerp(from, target, t, dest);
glm_quat_normalize(dest);
}