Index: TODO.txt
===================================================================
--- TODO.txt	(revision 98f06d94e4ffed65dd303dab65841241b3bf8d64)
+++ TODO.txt	(revision a23fc089e78744b5e954e76a7079245717fffdff)
@@ -6,5 +6,4 @@
  -Update the IMGUI code in a generic way to support this as well
 -Check the book's "Printing Parameters from the GL Context" to output a bunch of OpenGL context params
--Move some common functions into a Utils class
 
 DONE
@@ -17,4 +16,5 @@
  - What I really need to do is completely refactor the logger class to return an ofstream to the logger file
    and use streaming to send output to it. The log file can be closed in the destructor.
+-Move some common functions into a Utils class
 
 NEW TODO
Index: makefile
===================================================================
--- makefile	(revision 98f06d94e4ffed65dd303dab65841241b3bf8d64)
+++ makefile	(revision a23fc089e78744b5e954e76a7079245717fffdff)
@@ -15,5 +15,5 @@
 # as this well prevent regenerating .o files for unchanged .cpp files
 
-newgame: new-game.cpp logger.cpp stb_image.cpp imgui_impl_glfw_gl3.cpp CrashLogger.cpp $(IMGUI_FILES)
+newgame: new-game.cpp logger.cpp utils.cpp CrashLogger.cpp stb_image.cpp imgui_impl_glfw_gl3.cpp $(IMGUI_FILES)
 	$(CC) $^ $(DEP) $(CFLAGS) -o $@
 
Index: new-game.cpp
===================================================================
--- new-game.cpp	(revision 98f06d94e4ffed65dd303dab65841241b3bf8d64)
+++ new-game.cpp	(revision a23fc089e78744b5e954e76a7079245717fffdff)
@@ -198,8 +198,4 @@
 unsigned char* loadImage(string file_name, int* x, int* y);
 
-void printVec3(string label, const vec3& v);
-void printVec4(string label, const vec4& v);
-void printMat4(string label, const mat4& m);
-
 void initObject(SceneObject* obj);
 void addObjectToScene(SceneObject* obj,
@@ -255,6 +251,4 @@
 void initGuiValueLists(map<string, vector<UIValue>> valueLists);
 void renderGuiValueList(vector<UIValue>& values);
-
-float getRandomNum(float low, float high);
 
 #define NUM_KEYS (512)
@@ -1348,20 +1342,4 @@
 }
 
-void printVec3(string label, const vec3& v) {
-   cout << label << " -> (" << v.x << "," << v.y << "," << v.z << ")" << endl;
-}
-
-void printVec4(string label, const vec4& v) {
-   cout << label << " -> (" << v.x << "," << v.y << "," << v.z << "," << v.w << ")" << endl;
-}
-
-void printMat4(string label, const mat4& m) {
-   cout << label << ": " << endl;
-   cout << "[ " << m[0][0] << " " << m[1][0] << " " << m[2][0] << " " << m[3][0] <<  " ]" << endl;
-   cout << "[ " << m[0][1] << " " << m[1][1] << " " << m[2][1] << " " << m[3][1] <<  " ]" << endl;
-   cout << "[ " << m[0][2] << " " << m[1][2] << " " << m[2][2] << " " << m[3][2] <<  " ]" << endl;
-   cout << "[ " << m[0][3] << " " << m[1][3] << " " << m[2][3] << " " << m[3][3] <<  " ]" << endl;
-}
-
 // TODO: Pass a reference, not a pointer
 void initObject(SceneObject* obj) {
@@ -2736,6 +2714,2 @@
    return obj;
 }
-
-float getRandomNum(float low, float high) {
-   return low + ((float)rand() / RAND_MAX) * (high-low);
-}
Index: utils.cpp
===================================================================
--- utils.cpp	(revision a23fc089e78744b5e954e76a7079245717fffdff)
+++ utils.cpp	(revision a23fc089e78744b5e954e76a7079245717fffdff)
@@ -0,0 +1,23 @@
+#include "utils.h"
+
+#include <iostream>
+
+float getRandomNum(float low, float high) {
+   return low + ((float)rand() / RAND_MAX) * (high-low);
+}
+
+void printVec3(string label, const vec3& v) {
+   cout << label << " -> (" << v.x << "," << v.y << "," << v.z << ")" << endl;
+}
+
+void printVec4(string label, const vec4& v) {
+   cout << label << " -> (" << v.x << "," << v.y << "," << v.z << "," << v.w << ")" << endl;
+}
+
+void printMat4(string label, const mat4& m) {
+   cout << label << ": " << endl;
+   cout << "[ " << m[0][0] << " " << m[1][0] << " " << m[2][0] << " " << m[3][0] <<  " ]" << endl;
+   cout << "[ " << m[0][1] << " " << m[1][1] << " " << m[2][1] << " " << m[3][1] <<  " ]" << endl;
+   cout << "[ " << m[0][2] << " " << m[1][2] << " " << m[2][2] << " " << m[3][2] <<  " ]" << endl;
+   cout << "[ " << m[0][3] << " " << m[1][3] << " " << m[2][3] << " " << m[3][3] <<  " ]" << endl;
+}
Index: utils.h
===================================================================
--- utils.h	(revision 98f06d94e4ffed65dd303dab65841241b3bf8d64)
+++ utils.h	(revision a23fc089e78744b5e954e76a7079245717fffdff)
@@ -1,2 +1,18 @@
+#ifndef __UTILS_H__
+#define __UTILS_H__
+
+#include <string>
+
+#include <glm/mat4x4.hpp>
+
+using namespace std;
+using namespace glm;
+
+float getRandomNum(float low, float high);
+
+void printVec3(string label, const vec3& v);
+void printVec4(string label, const vec4& v);
+void printMat4(string label, const mat4& m);
+
 // Code for offset_of function from https://gist.github.com/graphitemaster/494f21190bb2c63c5516
 
@@ -16,2 +32,4 @@
    return offset_of_impl<T1, T2>::offset(member);
 }
+
+#endif
