#ifndef MATRIX_MATH
#define MATRIX_MATH

#include <GL/glew.h>

extern void vec3Zero(GLfloat* out);
extern void vec3Add(GLfloat* out, GLfloat* a, GLfloat* b);
extern void vec3Multiply(GLfloat* out, GLfloat* a, GLfloat x);
extern void vec3Subtract(GLfloat* out, GLfloat* a, GLfloat* b);
extern void vec3Cross(GLfloat* out, GLfloat* a, GLfloat* b);
extern void vec3Normalise(GLfloat* out, GLfloat* a);
extern GLfloat vec3Length(GLfloat* a);
extern GLfloat vec3Dot(GLfloat* a, GLfloat* b);

extern void identity(GLfloat* out);
extern void translation(GLfloat* out, GLfloat* v);
extern void scaling(GLfloat* out, GLfloat* v);
extern void rotationZ(GLfloat* out, GLfloat angle);
extern void rotationY(GLfloat* out, GLfloat angle);
extern void rotationX(GLfloat* out, GLfloat angle);

extern void multiplyAny(GLfloat* out, GLfloat* A, GLfloat* B, int wA, int hA, int wB);
extern void multiply(GLfloat* out, GLfloat* A, GLfloat* B);

extern void translate(GLfloat* out, GLfloat* in, GLfloat* v);
extern void scale(GLfloat* out, GLfloat* in, GLfloat* v);
extern void rotateZ(GLfloat* out, GLfloat* in, GLfloat angle);
extern void rotateY(GLfloat* out, GLfloat* in, GLfloat angle);
extern void rotateX(GLfloat* out, GLfloat* in, GLfloat angle);

extern void transposeAny(GLfloat* out, GLfloat* in, int w, int h);
extern void transpose(GLfloat* out, GLfloat* in);

extern void printAny(GLfloat* M, int w, int h);
extern void vec3Print(GLfloat* a);
extern void mat4Print(GLfloat* m);

#endif