summaryrefslogtreecommitdiffstats
path: root/neofx/math.h
diff options
context:
space:
mode:
Diffstat (limited to 'neofx/math.h')
-rw-r--r--neofx/math.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/neofx/math.h b/neofx/math.h
new file mode 100644
index 0000000..f0f6550
--- /dev/null
+++ b/neofx/math.h
@@ -0,0 +1,21 @@
+#ifndef NEOFX_MATH_H
+#define NEOFX_MATH_H
+
+#include "types.h"
+
+float VectorDot(VECTOR, VECTOR);
+VECTOR VectorCross(VECTOR, VECTOR);
+VECTOR VectorSub(VECTOR, VECTOR);
+VECTOR VectorAdd(VECTOR, VECTOR);
+VECTOR VectorMul(VECTOR, float);
+VECTOR VectorNormalize(VECTOR);
+VECTOR VectorNeg(VECTOR);
+float VectorLength(VECTOR);
+float VectorLengthSq(VECTOR);
+int VectorEqual(VECTOR, VECTOR);
+MATRIX MatrixMul(MATRIX, MATRIX);
+MATRIX MatrixIdentity();
+MATRIX VectorMatrix(VERTEX, VECTOR, VERTEX, VECTOR);
+VECTOR VectorMatrixMul(VECTOR, MATRIX);
+
+#endif