From 6fc9bef38524460335c86563a2cd8a66c8dfa60a Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Mon, 14 Aug 2023 15:38:20 +0100 Subject: [PATCH] m/vec3: Add float array helper --- src/xrt/auxiliary/math/m_vec3.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/xrt/auxiliary/math/m_vec3.h b/src/xrt/auxiliary/math/m_vec3.h index 18c65e119..df4620dbd 100644 --- a/src/xrt/auxiliary/math/m_vec3.h +++ b/src/xrt/auxiliary/math/m_vec3.h @@ -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) {