mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-04 06:06:17 +00:00
m/vec2: Add float array helper
This commit is contained in:
parent
4a10bc7028
commit
66d8e8066a
|
@ -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));
|
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
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue