From b3c40d60a3ba0703cb8f7ed40783906c412b1f14 Mon Sep 17 00:00:00 2001 From: tijani Date: Sun, 1 Sep 2024 14:14:59 -0500 Subject: [PATCH] fix error in Vec2F32 structure, it should be a union not a struct. --- src/base/base_math.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/base/base_math.h b/src/base/base_math.h index e34adcc..2b7400b 100644 --- a/src/base/base_math.h +++ b/src/base/base_math.h @@ -1,7 +1,7 @@ #ifndef BASE_MATH_H #define BASE_MATH_H -typedef struct Vec2F32 Vec2F32; +typedef union Vec2F32 Vec2F32; union Vec2F32 { struct { f32 x; @@ -10,14 +10,14 @@ union Vec2F32 { f32 v[2]; }; -typedef struct Vec3F32 Vec3F32; +typedef union Vec3F32 Vec3F32; union Vec3F32 { struct { f32 x; f32 y; f32 z; }; - f32 v[2]; + f32 v[3]; }; Vec3F32 vec3f32_rotate_x(Vec3F32 vector, float angle);