@@ -7,6 +7,8 @@
#include <errno.h>
#include <math.h>
+#include "oglt_math.h"
+
#define GLEW_STATIC
#include <GL/glew.h>
@@ -17,10 +19,6 @@
#define SCREEN_HEIGHT 768
#define MANUAL_TIME_STEP 0.1
-float lerp(float a, float b, float t)
-{
- return a + (b - a) * t;
-}
char *slurp_file(const char *file_path)
{
@@ -0,0 +1,9 @@
+#ifndef OGLT_MATH_H_
+#define OGLT_MATH_H_
+static inline float lerp(float a, float b, float t)
+{
+ return a + (b - a) * t;
+}
+#endif // OGLT_MATH_H_