From 284705b982b8d8dcbb184b1ba45644ced5a46793 Mon Sep 17 00:00:00 2001 From: metalvoidzz Date: Wed, 27 Mar 2019 18:18:35 +0100 Subject: Add the option to avoid inline (c89 compatibility) --- linmath.h | 102 +++++++++++++++++++++++++++++++++----------------------------- 1 file changed, 54 insertions(+), 48 deletions(-) diff --git a/linmath.h b/linmath.h index c1c3ab5..de9bae8 100644 --- a/linmath.h +++ b/linmath.h @@ -3,27 +3,33 @@ #include +#ifdef LINMATH_NO_INLINE +#define LINMATH_H_FUNC static +#else +#define LINMATH_H_FUNC static inline +#endif + #define LINMATH_H_DEFINE_VEC(n) \ typedef float vec##n[n]; \ -static inline void vec##n##_add(vec##n r, vec##n const a, vec##n const b) \ +LINMATH_H_FUNC void vec##n##_add(vec##n r, vec##n const a, vec##n const b) \ { \ int i; \ for(i=0; i