a/math: Fix m_vec3_angle function

Dot product is equivalent to a.length*b.length*cos(theta), not a.length_squared*b.length_squared*cos(theta)
This commit is contained in:
Moses Turner 2022-11-27 07:56:37 -06:00
parent fec8e13f73
commit 85c0c78ac6

View file

@ -110,6 +110,7 @@ m_vec3_angle(struct xrt_vec3 l, struct xrt_vec3 r)
if (lengths == 0) {
return 0;
}
lengths = sqrtf(lengths);
return acosf(dot / lengths);
}