a/math: Add m_vec3_inverse()

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2188>
This commit is contained in:
Jan Schmidt 2023-08-07 02:31:50 +10:00 committed by Marge Bot
parent ab5b21de8e
commit 1bfd5ed0cd

View file

@ -67,6 +67,13 @@ m_vec3_div_scalar(struct xrt_vec3 l, float r)
return ret;
}
static inline struct xrt_vec3
m_vec3_inverse(struct xrt_vec3 v)
{
struct xrt_vec3 ret = {-v.x, -v.y, -v.z};
return ret;
}
static inline float
m_vec3_dot(struct xrt_vec3 l, struct xrt_vec3 r)
{