typedef struct Matrix Matrix; struct Matrix { union { float e[16]; float cr[4][4]; }; }; typedef struct Vector4 Vector4; struct Vector4 { union { float e[4]; struct { float x, y, z, w; }; struct { float r, g, b, a; }; }; }; typedef struct Vector2 Vector2; struct Vector2 { union { float e[2]; struct { float x, y; }; struct { float s, t; }; }; }; Matrix identity(void); Matrix frustum(float l, float r, float b, float t, float n, float f); Matrix perspective(float fov, float aspect, float n, float f); Matrix mulmat(Matrix a, Matrix b); Vector4 mulmatvec(Matrix m, Vector4 v); Matrix translation(float x, float y, float z); Matrix rotationX(float a); Matrix rotationY(float a); Matrix rotationZ(float a);