m/vec3: Add float array helper

This commit is contained in:
Jakob Bornecrantz 2023-08-14 15:38:20 +01:00
parent 66d8e8066a
commit 6fc9bef385

View file

@ -143,9 +143,19 @@ m_vec3_equal_exact(struct xrt_vec3 l, struct xrt_vec3 r)
return l.x == r.x && l.y == r.y && l.z == r.z;
}
typedef float m_vec3_float_arr[3];
static inline m_vec3_float_arr *
m_vec3_ptr_to_float_arr_ptr(struct xrt_vec3 *ptr)
{
return (m_vec3_float_arr *)ptr;
}
#ifdef __cplusplus
}
static inline struct xrt_vec3
operator+(const struct xrt_vec3 &a, const struct xrt_vec3 &b)
{