mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-02-15 02:00:22 +00:00
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:
parent
fec8e13f73
commit
85c0c78ac6
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue