From af179f3b12fc1f1770bdda63937c0df0e9e9c9f2 Mon Sep 17 00:00:00 2001 From: Matthew Owens Date: Thu, 19 Nov 2020 21:48:15 +0000 Subject: [PATCH] updated positioning for mat4_t --- math_3d.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/math_3d.h b/math_3d.h index 32873fc..f174102 100644 --- a/math_3d.h +++ b/math_3d.h @@ -98,19 +98,19 @@ v1.0 2016-02-15 Initial release typedef struct { float x, y; } vec2_t; typedef struct { float x, y, z; } vec3_t; -typedef struct { float w, x, y, z; } vec4_t; +typedef struct { float x, y, z, w; } vec4_t; typedef struct { int x, y; } vec2i_t; typedef struct { int x, y, z; } vec3i_t; -typedef struct { int w, x, y, z; } vec4i_t; +typedef struct { int x, y, z, w; } vec4i_t; static inline vec3_t vec3(float x, float y, float z) { return (vec3_t){ x, y, z }; } static inline vec2_t vec2(float x, float y) { return (vec2_t){ x, y }; } -static inline vec4_t vec4(float w, float x,float y,float z) { return (vec4_t){ w, x, y, z }; } +static inline vec4_t vec4(float x, float y, float z, float w) { return (vec4_t){ w, x, y, z }; } static inline vec3i_t vec3i(int x, int y, int z) { return (vec3i_t){ x, y, z }; } static inline vec2i_t vec2i(int x, int y) { return (vec2i_t){ x, y }; } -static inline vec4i_t vec4i(int w, int x,int y,int z) { return (vec4i_t){ w, x, y, z }; } +static inline vec4i_t vec4i(int x, int y, int z, int w) { return (vec4i_t){ w, x, y, z }; } static inline vec3_t v3_add (vec3_t a, vec3_t b) { return (vec3_t){ a.x + b.x, a.y + b.y, a.z + b.z }; } -- 2.20.1