From 9c62a21ba91d347617856dee9ccdf6da1175a83f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Wed, 10 Mar 2021 21:39:16 +0100 Subject: [PATCH] Update linmath.h --- deps/linmath.h | 151 +++++++++++++++++++++---------------------------- 1 file changed, 66 insertions(+), 85 deletions(-) diff --git a/deps/linmath.h b/deps/linmath.h index 8b2a8c2e..be37caf6 100644 --- a/deps/linmath.h +++ b/deps/linmath.h @@ -1,13 +1,8 @@ #ifndef LINMATH_H #define LINMATH_H +#include #include - -/* 2020-03-02 Camilla Löwy - * - Added inclusion of string.h for memcpy - * - Replaced tan and acos with tanf and acosf - * - Replaced double constants with float equivalents - */ #include #ifdef LINMATH_NO_INLINE @@ -38,7 +33,7 @@ LINMATH_H_FUNC void vec##n##_scale(vec##n r, vec##n const v, float const s) \ } \ LINMATH_H_FUNC float vec##n##_mul_inner(vec##n const a, vec##n const b) \ { \ - float p = 0.; \ + float p = 0.f; \ int i; \ for(i=0; ib[i] ? a[i] : b[i]; \ +} \ +LINMATH_H_FUNC void vec##n##_dup(vec##n r, vec##n const src) \ +{ \ + int i; \ + for(i=0; i