added vec2_t
authormatthew <matthew@owens.tech>
Sat, 3 Nov 2018 16:18:35 +0000 (16:18 +0000)
committermatthew <matthew@owens.tech>
Sat, 3 Nov 2018 16:18:35 +0000 (16:18 +0000)
gl/math_3d.h

index 754603d..c5d0ffa 100644 (file)
@@ -96,6 +96,9 @@ v1.0  2016-02-15  Initial release
 // So you can just upload the vectors into shaders as they are.
 //
 
+typedef struct { float x, y; } vec2_t;
+static inline vec2_t vec2(float x, float y)                                    { return (vec2_t){ x, y }; }
+
 typedef struct { float x, y, z; } vec3_t;
 static inline vec3_t vec3(float x, float y, float z)        { return (vec3_t){ x, y, z }; }