m/vec2: Add float array helper

This commit is contained in:
Jakob Bornecrantz 2023-08-14 15:05:23 +01:00
parent 4a10bc7028
commit 66d8e8066a

View file

@ -109,6 +109,15 @@ m_vec2_lerp(struct xrt_vec2 from, struct xrt_vec2 to, float amount)
return m_vec2_add(m_vec2_mul_scalar(from, 1.0f - amount), m_vec2_mul_scalar(to, amount));
}
typedef float m_vec2_float_arr[2];
static inline m_vec2_float_arr *
m_vec2_ptr_to_float_arr_ptr(struct xrt_vec2 *ptr)
{
return (m_vec2_float_arr *)ptr;
}
#ifdef __cplusplus
}