#ifndef _VECMATH_H #define _VECMATH_H typedef union vec2_t { struct { float x; float y; }; float v[2]; } vec2_t; typedef union vec3_t { struct { float x; float y; float z; }; float v[3]; } vec3_t; typedef union vec4_t { struct { float x; float y; float z; float w; }; float v[4]; } vec4_t; typedef union ivec2_t { struct { int x; int y; }; int v[2]; } vec2_t; typedef union ivec3_t { struct { int x; int y; int z; }; int v[3]; } vec3_t; typedef union ivec4_t { struct { int x; int y; int z; int w; }; int v[4]; } vec4_t; #endif