From: matthew Date: Sat, 3 Nov 2018 16:18:35 +0000 (+0000) Subject: added vec2_t X-Git-Url: https://git.owens.tech/editable-focus.html/editable-focus.html/git?a=commitdiff_plain;h=934f88322a64ad04627caf7f4479967229fb5c07;p=csrpg.git added vec2_t --- diff --git a/gl/math_3d.h b/gl/math_3d.h index 754603d..c5d0ffa 100644 --- a/gl/math_3d.h +++ b/gl/math_3d.h @@ -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 }; }