Revert "updated positioning for mat4_t" master
authorMatthew Owens <matthew@owens.tech>
Fri, 20 Nov 2020 08:41:01 +0000 (08:41 +0000)
committerMatthew Owens <matthew@owens.tech>
Fri, 20 Nov 2020 08:41:01 +0000 (08:41 +0000)
This reverts commit af179f3b12fc1f1770bdda63937c0df0e9e9c9f2.

math_3d.h

index f174102..32873fc 100644 (file)
--- 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 x, y; } vec2_t;
 typedef struct { float x, y, z; } vec3_t;
-typedef struct { float x, y, z, w; } vec4_t;
+typedef struct { float w, x, y, z; } vec4_t;
 
 typedef struct { int x, y; } vec2i_t;
 typedef struct { int x, y, z; } vec3i_t;
 
 typedef struct { int x, y; } vec2i_t;
 typedef struct { int x, y, z; } vec3i_t;
-typedef struct { int x, y, z, w; } vec4i_t;
+typedef struct { int w, x, y, z; } 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 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 x, float y, float z, float w) { return (vec4_t){ w, x, y, z }; }
+static inline vec4_t vec4(float w, float x,float y,float z) { 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 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 x, int y, int z, int w)                { return (vec4i_t){ w, x, y, z }; }
+static inline vec4i_t vec4i(int w, int x,int y,int z)          { 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 }; }
 
 
 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 }; }