Repository: HandmadeMath/HandmadeMath (c)

Issue:
Making unit tests embeddable
Hello all,

I am using handmade math in a project, using a unity build. I'd like to keep this structure.

My project also has a mechanism for running unit tests. I'd like to fold the HMM unit tests in so they run seamlessly in my build.

This could be accomplished by splitting test/hmm_test.c into a test/hmm_test_runner.c and test/hmm_tests.h.

test_runner.c would contain the infrastructure necessary to run tests in a separate executable, and hmm_tests.h would contain the test "definitions". I would then use the test/hmm_tests.h file in my project, and provide my own macro set to map to my unit test structure.

I might also prefix the unit test related macros with HMMT to make it clear what's going on.

Before I jump in and implement this -- any objections? Alternate ideas?


Discussion:
@bvisness The unit test system is all yours. Take this 😋 
@revivalizer I'm frankly not sure why you need to run our unit tests in your build, since we guarantee that all of our tests pass when we release a new version. I also don't think it makes sense to heavily modify our unit test setup to work with other people's projects, since Handmade Math is explicitly designed to be included as a single header file, not to have its entire git repo dumped into a project.

Feel free to make whatever modifications you want, but I don't expect that we will be changing the structure of the tests in this repo.
I grant that this is perhaps not a typical request, but I think we (as a community) should do more of this, because:

> we guarantee that all of our tests pass when we release a new version

But do you test on my particular combination of
- OS
- bitness
- compiler
- compiler options
- define set
- libc replacement
?

> Handmade Math is explicitly designed to be included as a single header file

While single headers are nice for distribution and compiling, in practice I think a lot of people are not setup that way. You loose the ability to easily feed back github pull requests for example, whereas having a subrepo or whatever retains that ability.
Yeah, that's fair. I say go for it - as I thought about it more, I realized how little it actually changes the structure of the tests, but how much easier it makes things for you and others.

If you decide to prefix the test macros, I would prefer you prefix them with `HMT` (for HandmadeTest) instead of `HMMT`. 

Patch:
diff --git a/.gitignore b/.gitignore
--- a/.gitignore
+++ b/.gitignore
@@ -31,5 +31,4 @@
 *.exe
 *.out
 *.app
-hmm_test
-hmm_test*
+test/build
diff --git a/.travis.yml b/.travis.yml
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,7 +6,7 @@ install:
   - cd test
   - make
 script:
-  - ./hmm_test_c
-  - ./hmm_test_c_no_sse
-  - ./hmm_test_cpp
-  - ./hmm_test_cpp_no_sse
+  - build/hmm_test_c
+  - build/hmm_test_c_no_sse
+  - build/hmm_test_cpp
+  - build/hmm_test_cpp_no_sse


Test patch:
diff --git a/test/HandmadeTest.h b/test/HandmadeTest.h
--- a/test/HandmadeTest.h
+++ b/test/HandmadeTest.h
@@ -1,104 +1,263 @@
+/*
+  HandmadeTest.h
+
+  This is Handmade Math's test framework. It is fully compatible with both C
+  and C++, although it requires some compiler-specific features.
+
+  The basic way of creating a test is using the TEST macro, which registers a
+  single test to be run:
+
+     TEST(MyCategory, MyTestName) {
+        // test code, including asserts/expects
+     }
+
+  The main function of your test code should then call hmt_run_all_tests and
+  return the result:
+
+     int main() {
+        return hmt_run_all_tests();
+     }
+
+  =============================================================================
+
+  If Handmade Test's macros are conflicting with existing macros in your
+  project, you may define HMT_SAFE_MACROS before you include HandmadeTest.h.
+  You may then prefix each macro with HMT_. For example, you may use HMT_TEST
+  instead of TEST and HMT_EXPECT_TRUE instead of EXPECT_TRUE.
+
+ */
+
 #ifndef HANDMADETEST_H
 #define HANDMADETEST_H
 
 #include <float.h>
 #include <stdio.h>
+#include <string.h>
+
+#include "initializer.h"
 
-int hmt_count_tests = 0;
-int hmt_count_failedtests = 0;
-int hmt_count_failures = 0;
-
-#define RESET "\033[0m"
-#define RED   "\033[31m"
-#define GREEN "\033[32m"
-
-#define CATEGORY_BEGIN(name) { \
-    int count_categorytests = 0; \
-    int count_categoryfailedtests = 0; \
-    int count_categoryfailures = 0; \
-    printf("\n" #name ":\n");
-#define CATEGORY_END(name) \
-    hmt_count_tests += count_categorytests; \
-    hmt_count_failedtests += count_categoryfailedtests; \
-    hmt_count_failures += count_categoryfailures; \
-    printf("%d/%d tests passed, %d failures\n", count_categorytests - count_categoryfailedtests, count_categorytests, count_categoryfailures); \
+#define HMT_RESET "\033[0m"
+#define HMT_RED   "\033[31m"
+#define HMT_GREEN "\033[32m"
+
+#define HMT_INITIAL_ARRAY_SIZE 1024
+
+typedef struct hmt_testresult_struct {
+    int count_cases;
+    int count_failures;
+} hmt_testresult;
+
+typedef void (*hmt_test_func)(hmt_testresult*);
+
+typedef struct hmt_test_struct {
+    const char* name;
+    hmt_test_func func;
+} hmt_test;
+
+typedef struct hmt_category_struct {
+    const char* name;
+    int num_tests;
+    int tests_capacity;
+    hmt_test* tests;
+} hmt_category;
+
+int hmt_num_categories = 0;
+int hmt_category_capacity = HMT_INITIAL_ARRAY_SIZE;
+hmt_category* categories = 0;
+
+hmt_category _hmt_new_category(const char* name) {
+    hmt_category cat = {
+        .name = name,
+        .num_tests = 0,
+        .tests_capacity = HMT_INITIAL_ARRAY_SIZE,
+        .tests = (hmt_test*) malloc(HMT_INITIAL_ARRAY_SIZE * sizeof(hmt_test))
+    };
+
+    return cat;
 }
 
-#define TEST_BEGIN(name) { \
-    int count_testcases = 0, count_testfailures = 0; \
-    count_categorytests++; \
-    printf("    " #name ":");
-#define TEST_END() \
-    count_categoryfailures += count_testfailures; \
-    if (count_testfailures > 0) { \
-        count_categoryfailedtests++; \
-        printf("\n      " RED "(%d/%d passed)" RESET, count_testcases - count_testfailures, count_testcases); \
-        printf("\n"); \
-    } else { \
-        printf(GREEN " [PASS] (%d/%d passed) \n" RESET, count_testcases - count_testfailures, count_testcases); \
-    } \
+hmt_test _hmt_new_test(const char* name, hmt_test_func func) {
+    hmt_test test = {
+        .name = name,
+        .func = func
+    };
+
+    return test;
 }
 
-#define CASE_START() \
-    count_testcases++;
+int hmt_register_test(const char* category, const char* name, hmt_test_func func) {
+    // initialize categories array if not initialized
+    if (!categories) {
+        categories = (hmt_category*) malloc(hmt_category_capacity * sizeof(hmt_category));
+    }
+
+    // Find the matching category, if possible
+    int cat_index;
+    for (cat_index = 0; cat_index < hmt_num_categories; cat_index++) {
+        if (strcmp(categories[cat_index].name, category) == 0) {
+            break;
+        }
+    }
+
+    // Expand the array of categories if necessary
+    if (cat_index >= hmt_category_capacity) {
+        // TODO: If/when we ever split HandmadeTest off into its own package,
+        // we should start with a smaller initial capacity and dynamically expand.
+    }
 
-#define CASE_FAIL() \
-    count_testfailures++; \
-    printf("\n      - " RED "[FAIL] (%d) " RESET, __LINE__);
+    // Add a new category if necessary
+    if (cat_index >= hmt_num_categories) {
+        categories[cat_index] = _hmt_new_category(category);
+        hmt_num_categories++;
+    }
+
+    hmt_category* cat = &categories[cat_index];
+
+    // Add the test to the category
+    if (cat->num_tests >= cat->tests_capacity) {
+        // TODO: If/when we ever split HandmadeTest off into its own package,
+        // we should start with a smaller initial capacity and dynamically expand.
+    }
+    cat->tests[cat->num_tests] = _hmt_new_test(name, func);
+    cat->num_tests++;
+
+    return 0;
+}
+
+int hmt_run_all_tests() {
+    int count_alltests = 0;
+    int count_allfailedtests = 0; // failed test cases
+    int count_allfailures = 0; // failed asserts
+
+    for (int i = 0; i < hmt_num_categories; i++) {
+        hmt_category cat = categories[i];
+        int count_catfailedtests = 0; 
+        int count_catfailures = 0;
+
+        printf("\n%s:\n", cat.name);
+
+        for (int j = 0; j < cat.num_tests; j++) {
+            hmt_test test = cat.tests[j];
+
+            printf("    %s:", test.name);
+
+            hmt_testresult result = {
+                .count_cases = 0,
+                .count_failures = 0
+            };
+            test.func(&result);
+
+            count_catfailures += result.count_failures;
+
+            if (result.count_failures > 0) {
+                count_catfailedtests++;
+                printf("\n      " HMT_RED "(%d/%d passed)" HMT_RESET, result.count_cases - result.count_failures, result.count_cases);
+                printf("\n");
+            } else {
+                printf(HMT_GREEN " [PASS] (%d/%d passed) \n" HMT_RESET, result.count_cases - result.count_failures, result.count_cases);
+            }
+        }
+
+        count_alltests += cat.num_tests;
+        count_allfailedtests += count_catfailedtests;
+        count_allfailures += count_catfailures;
+
+        printf("%d/%d tests passed, %d failures\n", cat.num_tests - count_catfailedtests, cat.num_tests, count_catfailures);
+    }
+
+    if (count_allfailedtests > 0) {
+        printf(HMT_RED);
+    } else {
+        printf(HMT_GREEN);
+    }
+    printf("\n%d/%d tests passed overall, %d failures\n" HMT_RESET, count_alltests - count_allfailedtests, count_alltests, count_allfailures);
+
+    printf("\n");
+
+    return (count_allfailedtests > 0);
+}
+
+#define _HMT_TEST_FUNCNAME(category, name) category ## _ ## name
+#define _HMT_TEST_FUNCNAME_INIT(category, name) category ## _ ## name ## _init
+
+#define HMT_TEST(category, name) \
+void _HMT_TEST_FUNCNAME(category, name)(hmt_testresult* _result); \
+INITIALIZER(_HMT_TEST_FUNCNAME_INIT(category, name)) { \
+    hmt_register_test(#category, #name, _HMT_TEST_FUNCNAME(category, name)); \
+} \
+void _HMT_TEST_FUNCNAME(category, name)(hmt_testresult* _result)
+
+#define _HMT_CASE_START() \
+    _result->count_cases++;
+
+#define _HMT_CASE_FAIL() \
+    _result->count_failures++; \
+    printf("\n      - " HMT_RED "[FAIL] (%d) " HMT_RESET, __LINE__);
 
 /*
  * Asserts and expects
  */
-#define EXPECT_TRUE(_actual) do { \
-    CASE_START(); \
+#define HMT_EXPECT_TRUE(_actual) do { \
+    _HMT_CASE_START(); \
     if (!(_actual)) { \
-        CASE_FAIL(); \
+        _HMT_CASE_FAIL(); \
         printf("Expected true but got something false"); \
     } \
 } while (0)
 
-#define EXPECT_FALSE(_actual) do { \
-    CASE_START(); \
+#define HMT_EXPECT_FALSE(_actual) do { \
+    _HMT_CASE_START(); \
     if (_actual) { \
-        CASE_FAIL(); \
+        _HMT_CASE_FAIL(); \
         printf("Expected false but got something true"); \
     } \
 } while (0)
 
-#define EXPECT_FLOAT_EQ(_actual, _expected) do { \
-    CASE_START(); \
+#define HMT_EXPECT_FLOAT_EQ(_actual, _expected) do { \
+    _HMT_CASE_START(); \
     float actual = (_actual); \
     float diff = actual - (_expected); \
     if (diff < -FLT_EPSILON || FLT_EPSILON < diff) { \
-        CASE_FAIL(); \
+        _HMT_CASE_FAIL(); \
         printf("Expected %f, got %f", (_expected), actual); \
     } \
 } while (0)
 
-#define EXPECT_NEAR(_actual, _expected, _epsilon) do { \
-    CASE_START(); \
+#define HMT_EXPECT_NEAR(_actual, _expected, _epsilon) do { \
+    _HMT_CASE_START(); \
     float actual = (_actual); \
     float diff = actual - (_expected); \
     if (diff < -(_epsilon) || (_epsilon) < diff) { \
-        CASE_FAIL(); \
+        _HMT_CASE_FAIL(); \
         printf("Expected %f, got %f", (_expected), actual); \
     } \
 } while (0)
 
-#define EXPECT_LT(_actual, _expected) do { \
-    CASE_START(); \
+#define HMT_EXPECT_LT(_actual, _expected) do { \
+    _HMT_CASE_START(); \
     if ((_actual) >= (_expected)) { \
-        CASE_FAIL(); \
+        _HMT_CASE_FAIL(); \
         printf("Expected %f to be less than %f", (_actual), (_expected)); \
     } \
 } while (0)
 
-#define EXPECT_GT(_actual, _expected) do { \
-    CASE_START(); \
+#define HMT_EXPECT_GT(_actual, _expected) do { \
+    _HMT_CASE_START(); \
     if ((_actual) <= (_expected)) { \
-        CASE_FAIL(); \
+        _HMT_CASE_FAIL(); \
         printf("Expected %f to be greater than %f", (_actual), (_expected)); \
     } \
 } while (0)
 
-#endif
+#ifndef HMT_SAFE_MACROS
+// Friendly defines
+#define TEST(category, name) HMT_TEST(category, name)
+#define EXPECT_TRUE(_actual) HMT_EXPECT_TRUE(_actual)
+#define EXPECT_FALSE(_actual) HMT_EXPECT_FALSE(_actual)
+#define EXPECT_FLOAT_EQ(_actual, _expected) HMT_EXPECT_FLOAT_EQ(_actual, _expected)
+#define EXPECT_NEAR(_actual, _expected, _epsilon) HMT_EXPECT_NEAR(_actual, _expected, _epsilon)
+#define EXPECT_LT(_actual, _expected) HMT_EXPECT_LT(_actual, _expected)
+#define EXPECT_GT(_actual, _expected) HMT_EXPECT_GT(_actual, _expected)
+#endif // HMT_SAFE_MACROS
+
+#endif // HANDMADETEST_H
diff --git a/test/Makefile b/test/Makefile
--- a/test/Makefile
+++ b/test/Makefile
@@ -1,37 +1,45 @@
-ROOT_DIR=..
+BUILD_DIR=build
 
 CXXFLAGS+=-g -Wall -Wextra -pthread -Wno-missing-braces -Wno-missing-field-initializers
 
 all: c c_no_sse cpp cpp_no_sse
 
 clean:
-	rm -f hmm_test_c hmm_test_cpp hmm_test_c_no_sse hmm_test_cpp_no_sse *.o
+	rm -rf $(BUILD_DIR)
 
-c: $(ROOT_DIR)/test/HandmadeMath.c test_impl
+c: HandmadeMath.c test_impl
 	@echo "\nCompiling in C mode"
-	$(CC) $(CPPFLAGS) $(CXXFLAGS) -std=c99 \
-		-c $(ROOT_DIR)/test/HandmadeMath.c $(ROOT_DIR)/test/hmm_test.c \
-		-lm
-	$(CC) -ohmm_test_c HandmadeMath.o hmm_test.o -lm
-
-c_no_sse: $(ROOT_DIR)/test/HandmadeMath.c test_impl
+	mkdir -p $(BUILD_DIR)
+	cd $(BUILD_DIR)\
+		&& $(CC) $(CPPFLAGS) $(CXXFLAGS) -std=c99 \
+			-c ../HandmadeMath.c ../hmm_test.c \
+			-lm \
+		&& $(CC) -ohmm_test_c HandmadeMath.o hmm_test.o -lm
+
+c_no_sse: HandmadeMath.c test_impl
 	@echo "\nCompiling in C mode (no SSE)"
-	$(CC) $(CPPFLAGS) $(CXXFLAGS) -std=c99 \
-	    -DHANDMADE_MATH_NO_SSE \
-	    -c $(ROOT_DIR)/test/HandmadeMath.c $(ROOT_DIR)/test/hmm_test.c \
-	    -lm
-	$(CC) -ohmm_test_c_no_sse HandmadeMath.o hmm_test.o -lm
-
-cpp: $(ROOT_DIR)/test/HandmadeMath.cpp test_impl
+	mkdir -p $(BUILD_DIR)
+	cd $(BUILD_DIR) \
+		&& $(CC) $(CPPFLAGS) $(CXXFLAGS) -std=c99 \
+			-DHANDMADE_MATH_NO_SSE \
+			-c ../HandmadeMath.c ../hmm_test.c \
+			-lm \
+		&& $(CC) -ohmm_test_c_no_sse HandmadeMath.o hmm_test.o -lm
+
+cpp: HandmadeMath.cpp test_impl
 	@echo "\nCompiling in C++ mode"
-	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -ohmm_test_cpp \
-		-DHANDMADE_MATH_CPP_MODE \
-		$(ROOT_DIR)/test/HandmadeMath.cpp $(ROOT_DIR)/test/hmm_test.cpp
+	mkdir -p $(BUILD_DIR)
+	cd $(BUILD_DIR) \
+		&& $(CXX) $(CPPFLAGS) $(CXXFLAGS) -ohmm_test_cpp \
+			-DHANDMADE_MATH_CPP_MODE \
+			../HandmadeMath.cpp ../hmm_test.cpp
 
-cpp_no_sse: $(ROOT_DIR)/test/HandmadeMath.cpp test_impl
+cpp_no_sse: HandmadeMath.cpp test_impl
 	@echo "\nCompiling in C++ mode (no SSE)"
-	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -ohmm_test_cpp_no_sse \
-		-DHANDMADE_MATH_CPP_MODE -DHANDMADE_MATH_NO_SSE \
-		$(ROOT_DIR)/test/HandmadeMath.cpp $(ROOT_DIR)/test/hmm_test.cpp
+	mkdir -p $(BUILD_DIR)
+	cd $(BUILD_DIR) \
+		&& $(CXX) $(CPPFLAGS) $(CXXFLAGS) -ohmm_test_cpp_no_sse \
+			-DHANDMADE_MATH_CPP_MODE -DHANDMADE_MATH_NO_SSE \
+			../HandmadeMath.cpp ../hmm_test.cpp
 
-test_impl: $(ROOT_DIR)/test/hmm_test.cpp $(ROOT_DIR)/test/hmm_test.c
+test_impl: hmm_test.cpp hmm_test.c
diff --git a/test/README.md b/test/README.md
--- a/test/README.md
+++ b/test/README.md
@@ -4,8 +4,8 @@ You can compile and run the tests yourself by running:
 
 ```
 make
-./hmm_test_c
-./hmm_test_c_no_sse
-./hmm_test_cpp
-./hmm_test_cpp_no_sse
+build/hmm_test_c
+build/hmm_test_c_no_sse
+build/hmm_test_cpp
+build/hmm_test_cpp_no_sse
 ```
diff --git a/test/categories/Addition.h b/test/categories/Addition.h
new file mode 100644
--- /dev/null
+++ b/test/categories/Addition.h
@@ -0,0 +1,209 @@
+#include "../HandmadeTest.h"
+
+TEST(Addition, Vec2)
+{
+    hmm_vec2 v2_1 = HMM_Vec2(1.0f, 2.0f);
+    hmm_vec2 v2_2 = HMM_Vec2(3.0f, 4.0f);
+
+    {
+        hmm_vec2 result = HMM_AddVec2(v2_1, v2_2);
+        EXPECT_FLOAT_EQ(result.X, 4.0f);
+        EXPECT_FLOAT_EQ(result.Y, 6.0f);
+    }
+#ifdef __cplusplus
+    {
+        hmm_vec2 result = HMM_Add(v2_1, v2_2);
+        EXPECT_FLOAT_EQ(result.X, 4.0f);
+        EXPECT_FLOAT_EQ(result.Y, 6.0f);
+    }
+    {
+        hmm_vec2 result = v2_1 + v2_2;
+        EXPECT_FLOAT_EQ(result.X, 4.0f);
+        EXPECT_FLOAT_EQ(result.Y, 6.0f);
+    }
+
+    v2_1 += v2_2;
+    EXPECT_FLOAT_EQ(v2_1.X, 4.0f);
+    EXPECT_FLOAT_EQ(v2_1.Y, 6.0f);
+#endif
+}
+
+TEST(Addition, Vec3)
+{
+    hmm_vec3 v3_1 = HMM_Vec3(1.0f, 2.0f, 3.0f);
+    hmm_vec3 v3_2 = HMM_Vec3(4.0f, 5.0f, 6.0f);
+
+    {
+        hmm_vec3 result = HMM_AddVec3(v3_1, v3_2);
+        EXPECT_FLOAT_EQ(result.X, 5.0f);
+        EXPECT_FLOAT_EQ(result.Y, 7.0f);
+        EXPECT_FLOAT_EQ(result.Z, 9.0f);    
+    }
+#ifdef __cplusplus
+    {
+        hmm_vec3 result = HMM_Add(v3_1, v3_2);
+        EXPECT_FLOAT_EQ(result.X, 5.0f);
+        EXPECT_FLOAT_EQ(result.Y, 7.0f);
+        EXPECT_FLOAT_EQ(result.Z, 9.0f);
+    }
+    {
+        hmm_vec3 result = v3_1 + v3_2;
+        EXPECT_FLOAT_EQ(result.X, 5.0f);
+        EXPECT_FLOAT_EQ(result.Y, 7.0f);
+        EXPECT_FLOAT_EQ(result.Z, 9.0f);
+    }
+
+    v3_1 += v3_2;
+    EXPECT_FLOAT_EQ(v3_1.X, 5.0f);
+    EXPECT_FLOAT_EQ(v3_1.Y, 7.0f);
+    EXPECT_FLOAT_EQ(v3_1.Z, 9.0f);
+#endif
+}
+
+TEST(Addition, Vec4)
+{
+    hmm_vec4 v4_1 = HMM_Vec4(1.0f, 2.0f, 3.0f, 4.0f);
+    hmm_vec4 v4_2 = HMM_Vec4(5.0f, 6.0f, 7.0f, 8.0f);
+    
+    {
+        hmm_vec4 result = HMM_AddVec4(v4_1, v4_2);
+        EXPECT_FLOAT_EQ(result.X, 6.0f);
+        EXPECT_FLOAT_EQ(result.Y, 8.0f);
+        EXPECT_FLOAT_EQ(result.Z, 10.0f);
+        EXPECT_FLOAT_EQ(result.W, 12.0f);
+    }
+#ifdef __cplusplus
+    {
+        hmm_vec4 result = HMM_Add(v4_1, v4_2);
+        EXPECT_FLOAT_EQ(result.X, 6.0f);
+        EXPECT_FLOAT_EQ(result.Y, 8.0f);
+        EXPECT_FLOAT_EQ(result.Z, 10.0f);
+        EXPECT_FLOAT_EQ(result.W, 12.0f);
+    }
+    {
+        hmm_vec4 result = v4_1 + v4_2;
+        EXPECT_FLOAT_EQ(result.X, 6.0f);
+        EXPECT_FLOAT_EQ(result.Y, 8.0f);
+        EXPECT_FLOAT_EQ(result.Z, 10.0f);
+        EXPECT_FLOAT_EQ(result.W, 12.0f);
+    }
+
+    v4_1 += v4_2;
+    EXPECT_FLOAT_EQ(v4_1.X, 6.0f);
+    EXPECT_FLOAT_EQ(v4_1.Y, 8.0f);
+    EXPECT_FLOAT_EQ(v4_1.Z, 10.0f);
+    EXPECT_FLOAT_EQ(v4_1.W, 12.0f);
+#endif
+}
+
+TEST(Addition, Mat4)
+{
+    hmm_mat4 m4_1 = HMM_Mat4(); // will have 1 - 16
+    hmm_mat4 m4_2 = HMM_Mat4(); // will have 17 - 32
+
+    // Fill the matrices
+    int Counter = 1;
+    for (int Column = 0; Column < 4; ++Column)
+    {
+        for (int Row = 0; Row < 4; ++Row)
+        {
+            m4_1.Elements[Column][Row] = Counter;
+            ++Counter;
+        }
+    }
+    for (int Column = 0; Column < 4; ++Column)
+    {
+        for (int Row = 0; Row < 4; ++Row)
+        {
+            m4_2.Elements[Column][Row] = Counter;
+            ++Counter;
+        }
+    }
+
+    // Test the results
+    {
+        hmm_mat4 result = HMM_AddMat4(m4_1, m4_2);
+        float Expected = 18.0f;
+        for (int Column = 0; Column < 4; ++Column)
+        {
+            for (int Row = 0; Row < 4; ++Row)
+            {
+                EXPECT_FLOAT_EQ(result.Elements[Column][Row], Expected);
+                Expected += 2.0f;
+            }
+        }
+    }
+#ifdef __cplusplus
+    {
+        hmm_mat4 result = HMM_Add(m4_1, m4_2);
+        float Expected = 18.0f;
+        for (int Column = 0; Column < 4; ++Column)
+        {
+            for (int Row = 0; Row < 4; ++Row)
+            {
+                EXPECT_FLOAT_EQ(result.Elements[Column][Row], Expected);
+                Expected += 2.0f;
+            }
+        }
+    }
+    {
+        hmm_mat4 result = m4_1 + m4_2;
+        float Expected = 18.0f;
+        for (int Column = 0; Column < 4; ++Column)
+        {
+            for (int Row = 0; Row < 4; ++Row)
+            {
+                EXPECT_FLOAT_EQ(result.Elements[Column][Row], Expected);
+                Expected += 2.0f;
+            }
+        }
+    }
+
+    m4_1 += m4_2;
+    float Expected = 18.0f;
+    for (int Column = 0; Column < 4; ++Column)
+    {
+        for (int Row = 0; Row < 4; ++Row)
+        {
+            EXPECT_FLOAT_EQ(m4_1.Elements[Column][Row], Expected);
+            Expected += 2.0f;
+        }
+    }
+#endif
+}
+
+TEST(Addition, Quaternion)
+{
+    hmm_quaternion q1 = HMM_Quaternion(1.0f, 2.0f, 3.0f, 4.0f);
+    hmm_quaternion q2 = HMM_Quaternion(5.0f, 6.0f, 7.0f, 8.0f);
+
+    {
+        hmm_quaternion result = HMM_AddQuaternion(q1, q2);
+        EXPECT_FLOAT_EQ(result.X, 6.0f);
+        EXPECT_FLOAT_EQ(result.Y, 8.0f);
+        EXPECT_FLOAT_EQ(result.Z, 10.0f);
+        EXPECT_FLOAT_EQ(result.W, 12.0f);
+    }
+#ifdef __cplusplus
+    {
+        hmm_quaternion result = HMM_Add(q1, q2);
+        EXPECT_FLOAT_EQ(result.X, 6.0f);
+        EXPECT_FLOAT_EQ(result.Y, 8.0f);
+        EXPECT_FLOAT_EQ(result.Z, 10.0f);
+        EXPECT_FLOAT_EQ(result.W, 12.0f);
+    }
+    {
+        hmm_quaternion result = q1 + q2;
+        EXPECT_FLOAT_EQ(result.X, 6.0f);
+        EXPECT_FLOAT_EQ(result.Y, 8.0f);
+        EXPECT_FLOAT_EQ(result.Z, 10.0f);
+        EXPECT_FLOAT_EQ(result.W, 12.0f);
+    }
+
+    q1 += q2;
+    EXPECT_FLOAT_EQ(q1.X, 6.0f);
+    EXPECT_FLOAT_EQ(q1.Y, 8.0f);
+    EXPECT_FLOAT_EQ(q1.Z, 10.0f);
+    EXPECT_FLOAT_EQ(q1.W, 12.0f);
+#endif
+}
diff --git a/test/categories/Division.h b/test/categories/Division.h
new file mode 100644
--- /dev/null
+++ b/test/categories/Division.h
@@ -0,0 +1,325 @@
+#include "../HandmadeTest.h"
+
+TEST(Division, Vec2Vec2)
+{
+    hmm_vec2 v2_1 = HMM_Vec2(1.0f, 3.0f);
+    hmm_vec2 v2_2 = HMM_Vec2(2.0f, 4.0f);
+
+    {
+        hmm_vec2 result = HMM_DivideVec2(v2_1, v2_2);
+        EXPECT_FLOAT_EQ(result.X, 0.5f);
+        EXPECT_FLOAT_EQ(result.Y, 0.75f);
+    }
+#ifdef __cplusplus
+    {
+        hmm_vec2 result = HMM_Divide(v2_1, v2_2);
+        EXPECT_FLOAT_EQ(result.X, 0.5f);
+        EXPECT_FLOAT_EQ(result.Y, 0.75f);
+    }
+    {
+        hmm_vec2 result = v2_1 / v2_2;
+        EXPECT_FLOAT_EQ(result.X, 0.5f);
+        EXPECT_FLOAT_EQ(result.Y, 0.75f);
+    }
+
+    v2_1 /= v2_2;
+    EXPECT_FLOAT_EQ(v2_1.X, 0.5f);
+    EXPECT_FLOAT_EQ(v2_1.Y, 0.75f);
+#endif
+}
+
+TEST(Division, Vec2Scalar)
+{
+    hmm_vec2 v2 = HMM_Vec2(1.0f, 2.0f);
+    float s = 2;
+
+    {
+        hmm_vec2 result = HMM_DivideVec2f(v2, s);
+        EXPECT_FLOAT_EQ(result.X, 0.5f);
+        EXPECT_FLOAT_EQ(result.Y, 1.0f);
+    }
+#ifdef __cplusplus
+    {
+        hmm_vec2 result = HMM_Divide(v2, s);
+        EXPECT_FLOAT_EQ(result.X, 0.5f);
+        EXPECT_FLOAT_EQ(result.Y, 1.0f);
+    }
+    {
+        hmm_vec2 result = v2 / s;
+        EXPECT_FLOAT_EQ(result.X, 0.5f);
+        EXPECT_FLOAT_EQ(result.Y, 1.0f);
+    }
+
+    v2 /= s;
+    EXPECT_FLOAT_EQ(v2.X, 0.5f);
+    EXPECT_FLOAT_EQ(v2.Y, 1.0f);
+#endif
+}
+
+TEST(Division, Vec3Vec3)
+{
+    hmm_vec3 v3_1 = HMM_Vec3(1.0f, 3.0f, 5.0f);
+    hmm_vec3 v3_2 = HMM_Vec3(2.0f, 4.0f, 0.5f);
+
+    {
+        hmm_vec3 result = HMM_DivideVec3(v3_1, v3_2);
+        EXPECT_FLOAT_EQ(result.X, 0.5f);
+        EXPECT_FLOAT_EQ(result.Y, 0.75f);
+        EXPECT_FLOAT_EQ(result.Z, 10.0f);
+    }
+#ifdef __cplusplus
+    {
+        hmm_vec3 result = HMM_Divide(v3_1, v3_2);
+        EXPECT_FLOAT_EQ(result.X, 0.5f);
+        EXPECT_FLOAT_EQ(result.Y, 0.75f);
+        EXPECT_FLOAT_EQ(result.Z, 10.0f);
+    }
+    {
+        hmm_vec3 result = v3_1 / v3_2;
+        EXPECT_FLOAT_EQ(result.X, 0.5f);
+        EXPECT_FLOAT_EQ(result.Y, 0.75f);
+        EXPECT_FLOAT_EQ(result.Z, 10.0f);
+    }
+
+    v3_1 /= v3_2;
+    EXPECT_FLOAT_EQ(v3_1.X, 0.5f);
+    EXPECT_FLOAT_EQ(v3_1.Y, 0.75f);
+    EXPECT_FLOAT_EQ(v3_1.Z, 10.0f);
+#endif
+}
+
+TEST(Division, Vec3Scalar)
+{
+    hmm_vec3 v3 = HMM_Vec3(1.0f, 2.0f, 3.0f);
+    float s = 2;
+
+    {
+        hmm_vec3 result = HMM_DivideVec3f(v3, s);
+        EXPECT_FLOAT_EQ(result.X, 0.5f);
+        EXPECT_FLOAT_EQ(result.Y, 1.0f);
+        EXPECT_FLOAT_EQ(result.Z, 1.5f);
+    }
+#ifdef __cplusplus
+    {
+        hmm_vec3 result = HMM_Divide(v3, s);
+        EXPECT_FLOAT_EQ(result.X, 0.5f);
+        EXPECT_FLOAT_EQ(result.Y, 1.0f);
+        EXPECT_FLOAT_EQ(result.Z, 1.5f);
+    }
+    {
+        hmm_vec3 result = v3 / s;
+        EXPECT_FLOAT_EQ(result.X, 0.5f);
+        EXPECT_FLOAT_EQ(result.Y, 1.0f);
+        EXPECT_FLOAT_EQ(result.Z, 1.5f);
+    }
+
+    v3 /= s;
+    EXPECT_FLOAT_EQ(v3.X, 0.5f);
+    EXPECT_FLOAT_EQ(v3.Y, 1.0f);
+    EXPECT_FLOAT_EQ(v3.Z, 1.5f);
+#endif
+}
+
+TEST(Division, Vec4Vec4)
+{
+    hmm_vec4 v4_1 = HMM_Vec4(1.0f, 3.0f, 5.0f, 1.0f);
+    hmm_vec4 v4_2 = HMM_Vec4(2.0f, 4.0f, 0.5f, 4.0f);
+
+    {
+        hmm_vec4 result = HMM_DivideVec4(v4_1, v4_2);
+        EXPECT_FLOAT_EQ(result.X, 0.5f);
+        EXPECT_FLOAT_EQ(result.Y, 0.75f);
+        EXPECT_FLOAT_EQ(result.Z, 10.0f);
+        EXPECT_FLOAT_EQ(result.W, 0.25f);
+    }
+#ifdef __cplusplus
+    {
+        hmm_vec4 result = HMM_Divide(v4_1, v4_2);
+        EXPECT_FLOAT_EQ(result.X, 0.5f);
+        EXPECT_FLOAT_EQ(result.Y, 0.75f);
+        EXPECT_FLOAT_EQ(result.Z, 10.0f);
+        EXPECT_FLOAT_EQ(result.W, 0.25f);
+    }
+    {
+        hmm_vec4 result = v4_1 / v4_2;
+        EXPECT_FLOAT_EQ(result.X, 0.5f);
+        EXPECT_FLOAT_EQ(result.Y, 0.75f);
+        EXPECT_FLOAT_EQ(result.Z, 10.0f);
+        EXPECT_FLOAT_EQ(result.W, 0.25f);
+    }
+
+    v4_1 /= v4_2;
+    EXPECT_FLOAT_EQ(v4_1.X, 0.5f);
+    EXPECT_FLOAT_EQ(v4_1.Y, 0.75f);
+    EXPECT_FLOAT_EQ(v4_1.Z, 10.0f);
+    EXPECT_FLOAT_EQ(v4_1.W, 0.25f);
+#endif
+}
+
+TEST(Division, Vec4Scalar)
+{
+    hmm_vec4 v4 = HMM_Vec4(1.0f, 2.0f, 3.0f, 4.0f);
+    float s = 2;
+
+    {
+        hmm_vec4 result = HMM_DivideVec4f(v4, s);
+        EXPECT_FLOAT_EQ(result.X, 0.5f);
+        EXPECT_FLOAT_EQ(result.Y, 1.0f);
+        EXPECT_FLOAT_EQ(result.Z, 1.5f);
+        EXPECT_FLOAT_EQ(result.W, 2.0f);
+    }
+#ifdef __cplusplus
+    {
+        hmm_vec4 result = HMM_Divide(v4, s);
+        EXPECT_FLOAT_EQ(result.X, 0.5f);
+        EXPECT_FLOAT_EQ(result.Y, 1.0f);
+        EXPECT_FLOAT_EQ(result.Z, 1.5f);
+        EXPECT_FLOAT_EQ(result.W, 2.0f);
+    }
+    {
+        hmm_vec4 result = v4 / s;
+        EXPECT_FLOAT_EQ(result.X, 0.5f);
+        EXPECT_FLOAT_EQ(result.Y, 1.0f);
+        EXPECT_FLOAT_EQ(result.Z, 1.5f);
+        EXPECT_FLOAT_EQ(result.W, 2.0f);
+    }
+
+    v4 /= s;
+    EXPECT_FLOAT_EQ(v4.X, 0.5f);
+    EXPECT_FLOAT_EQ(v4.Y, 1.0f);
+    EXPECT_FLOAT_EQ(v4.Z, 1.5f);
+    EXPECT_FLOAT_EQ(v4.W, 2.0f);
+#endif
+}
+
+TEST(Division, Mat4Scalar)
+{
+    hmm_mat4 m4 = HMM_Mat4(); // will have 1 - 16
+    float s = 2;
+
+    // Fill the matrix
+    int Counter = 1;
+    for (int Column = 0; Column < 4; ++Column)
+    {
+        for (int Row = 0; Row < 4; ++Row)
+        {
+            m4.Elements[Column][Row] = Counter;
+            ++Counter;
+        }
+    }
+
+    // Test the results
+    {
+        hmm_mat4 result = HMM_DivideMat4f(m4, s);
+        EXPECT_FLOAT_EQ(result.Elements[0][0], 0.5f);
+        EXPECT_FLOAT_EQ(result.Elements[0][1], 1.0f);
+        EXPECT_FLOAT_EQ(result.Elements[0][2], 1.5f);
+        EXPECT_FLOAT_EQ(result.Elements[0][3], 2.0f);
+        EXPECT_FLOAT_EQ(result.Elements[1][0], 2.5f);
+        EXPECT_FLOAT_EQ(result.Elements[1][1], 3.0f);
+        EXPECT_FLOAT_EQ(result.Elements[1][2], 3.5f);
+        EXPECT_FLOAT_EQ(result.Elements[1][3], 4.0f);
+        EXPECT_FLOAT_EQ(result.Elements[2][0], 4.5f);
+        EXPECT_FLOAT_EQ(result.Elements[2][1], 5.0f);
+        EXPECT_FLOAT_EQ(result.Elements[2][2], 5.5f);
+        EXPECT_FLOAT_EQ(result.Elements[2][3], 6.0f);
+        EXPECT_FLOAT_EQ(result.Elements[3][0], 6.5f);
+        EXPECT_FLOAT_EQ(result.Elements[3][1], 7.0f);
+        EXPECT_FLOAT_EQ(result.Elements[3][2], 7.5f);
+        EXPECT_FLOAT_EQ(result.Elements[3][3], 8.0f);
+    }
+#ifdef __cplusplus
+    {
+        hmm_mat4 result = HMM_Divide(m4, s);
+        EXPECT_FLOAT_EQ(result.Elements[0][0], 0.5f);
+        EXPECT_FLOAT_EQ(result.Elements[0][1], 1.0f);
+        EXPECT_FLOAT_EQ(result.Elements[0][2], 1.5f);
+        EXPECT_FLOAT_EQ(result.Elements[0][3], 2.0f);
+        EXPECT_FLOAT_EQ(result.Elements[1][0], 2.5f);
+        EXPECT_FLOAT_EQ(result.Elements[1][1], 3.0f);
+        EXPECT_FLOAT_EQ(result.Elements[1][2], 3.5f);
+        EXPECT_FLOAT_EQ(result.Elements[1][3], 4.0f);
+        EXPECT_FLOAT_EQ(result.Elements[2][0], 4.5f);
+        EXPECT_FLOAT_EQ(result.Elements[2][1], 5.0f);
+        EXPECT_FLOAT_EQ(result.Elements[2][2], 5.5f);
+        EXPECT_FLOAT_EQ(result.Elements[2][3], 6.0f);
+        EXPECT_FLOAT_EQ(result.Elements[3][0], 6.5f);
+        EXPECT_FLOAT_EQ(result.Elements[3][1], 7.0f);
+        EXPECT_FLOAT_EQ(result.Elements[3][2], 7.5f);
+        EXPECT_FLOAT_EQ(result.Elements[3][3], 8.0f);
+    }
+    {
+        hmm_mat4 result = m4 / s;
+        EXPECT_FLOAT_EQ(result.Elements[0][0], 0.5f);
+        EXPECT_FLOAT_EQ(result.Elements[0][1], 1.0f);
+        EXPECT_FLOAT_EQ(result.Elements[0][2], 1.5f);
+        EXPECT_FLOAT_EQ(result.Elements[0][3], 2.0f);
+        EXPECT_FLOAT_EQ(result.Elements[1][0], 2.5f);
+        EXPECT_FLOAT_EQ(result.Elements[1][1], 3.0f);
+        EXPECT_FLOAT_EQ(result.Elements[1][2], 3.5f);
+        EXPECT_FLOAT_EQ(result.Elements[1][3], 4.0f);
+        EXPECT_FLOAT_EQ(result.Elements[2][0], 4.5f);
+        EXPECT_FLOAT_EQ(result.Elements[2][1], 5.0f);
+        EXPECT_FLOAT_EQ(result.Elements[2][2], 5.5f);
+        EXPECT_FLOAT_EQ(result.Elements[2][3], 6.0f);
+        EXPECT_FLOAT_EQ(result.Elements[3][0], 6.5f);
+        EXPECT_FLOAT_EQ(result.Elements[3][1], 7.0f);
+        EXPECT_FLOAT_EQ(result.Elements[3][2], 7.5f);
+        EXPECT_FLOAT_EQ(result.Elements[3][3], 8.0f);
+    }
+
+    m4 /= s;
+    EXPECT_FLOAT_EQ(m4.Elements[0][0], 0.5f);
+    EXPECT_FLOAT_EQ(m4.Elements[0][1], 1.0f);
+    EXPECT_FLOAT_EQ(m4.Elements[0][2], 1.5f);
+    EXPECT_FLOAT_EQ(m4.Elements[0][3], 2.0f);
+    EXPECT_FLOAT_EQ(m4.Elements[1][0], 2.5f);
+    EXPECT_FLOAT_EQ(m4.Elements[1][1], 3.0f);
+    EXPECT_FLOAT_EQ(m4.Elements[1][2], 3.5f);
+    EXPECT_FLOAT_EQ(m4.Elements[1][3], 4.0f);
+    EXPECT_FLOAT_EQ(m4.Elements[2][0], 4.5f);
+    EXPECT_FLOAT_EQ(m4.Elements[2][1], 5.0f);
+    EXPECT_FLOAT_EQ(m4.Elements[2][2], 5.5f);
+    EXPECT_FLOAT_EQ(m4.Elements[2][3], 6.0f);
+    EXPECT_FLOAT_EQ(m4.Elements[3][0], 6.5f);
+    EXPECT_FLOAT_EQ(m4.Elements[3][1], 7.0f);
+    EXPECT_FLOAT_EQ(m4.Elements[3][2], 7.5f);
+    EXPECT_FLOAT_EQ(m4.Elements[3][3], 8.0f);
+#endif
+}
+
+TEST(Division, QuaternionScalar)
+{
+    hmm_quaternion q = HMM_Quaternion(1.0f, 2.0f, 3.0f, 4.0f);
+    float f = 2.0f;
+
+    {
+        hmm_quaternion result = HMM_DivideQuaternionF(q, f);
+        EXPECT_FLOAT_EQ(result.X, 0.5f);
+        EXPECT_FLOAT_EQ(result.Y, 1.0f);
+        EXPECT_FLOAT_EQ(result.Z, 1.5f);
+        EXPECT_FLOAT_EQ(result.W, 2.0f);
+    }
+#ifdef __cplusplus
+    {
+        hmm_quaternion result = HMM_Divide(q, f);
+        EXPECT_FLOAT_EQ(result.X, 0.5f);
+        EXPECT_FLOAT_EQ(result.Y, 1.0f);
+        EXPECT_FLOAT_EQ(result.Z, 1.5f);
+        EXPECT_FLOAT_EQ(result.W, 2.0f);
+    }
+    {
+        hmm_quaternion result = q / f;
+        EXPECT_FLOAT_EQ(result.X, 0.5f);
+        EXPECT_FLOAT_EQ(result.Y, 1.0f);
+        EXPECT_FLOAT_EQ(result.Z, 1.5f);
+        EXPECT_FLOAT_EQ(result.W, 2.0f);
+    }
+
+    q /= f;
+    EXPECT_FLOAT_EQ(q.X, 0.5f);
+    EXPECT_FLOAT_EQ(q.Y, 1.0f);
+    EXPECT_FLOAT_EQ(q.Z, 1.5f);
+    EXPECT_FLOAT_EQ(q.W, 2.0f);
+#endif
+}
diff --git a/test/categories/Equality.h b/test/categories/Equality.h
new file mode 100644
--- /dev/null
+++ b/test/categories/Equality.h
@@ -0,0 +1,55 @@
+#include "../HandmadeTest.h"
+
+TEST(Equality, Vec2)
+{
+    hmm_vec2 a = HMM_Vec2(1.0f, 2.0f);
+    hmm_vec2 b = HMM_Vec2(1.0f, 2.0f);
+    hmm_vec2 c = HMM_Vec2(3.0f, 4.0f);
+
+    EXPECT_TRUE(HMM_EqualsVec2(a, b));
+    EXPECT_FALSE(HMM_EqualsVec2(a, c));
+
+#ifdef __cplusplus
+    EXPECT_TRUE(HMM_Equals(a, b));
+    EXPECT_FALSE(HMM_Equals(a, c));
+
+    EXPECT_TRUE(a == b);
+    EXPECT_FALSE(a == c);
+#endif
+}
+
+TEST(Equality, Vec3)
+{
+    hmm_vec3 a = HMM_Vec3(1.0f, 2.0f, 3.0f);
+    hmm_vec3 b = HMM_Vec3(1.0f, 2.0f, 3.0f);
+    hmm_vec3 c = HMM_Vec3(4.0f, 5.0f, 6.0f);
+
+    EXPECT_TRUE(HMM_EqualsVec3(a, b));
+    EXPECT_FALSE(HMM_EqualsVec3(a, c));
+
+#ifdef __cplusplus
+    EXPECT_TRUE(HMM_Equals(a, b));
+    EXPECT_FALSE(HMM_Equals(a, c));
+
+    EXPECT_TRUE(a == b);
+    EXPECT_FALSE(a == c);
+#endif
+}
+
+TEST(Equality, Vec4)
+{
+    hmm_vec4 a = HMM_Vec4(1.0f, 2.0f, 3.0f, 4.0f);
+    hmm_vec4 b = HMM_Vec4(1.0f, 2.0f, 3.0f, 4.0f);
+    hmm_vec4 c = HMM_Vec4(5.0f, 6.0f, 7.0f, 8.0f);
+
+    EXPECT_TRUE(HMM_EqualsVec4(a, b));
+    EXPECT_FALSE(HMM_EqualsVec4(a, c));
+
+#ifdef __cplusplus
+    EXPECT_TRUE(HMM_Equals(a, b));
+    EXPECT_FALSE(HMM_Equals(a, c));
+
+    EXPECT_TRUE(a == b);
+    EXPECT_FALSE(a == c);
+#endif
+}
diff --git a/test/categories/Initialization.h b/test/categories/Initialization.h
new file mode 100644
--- /dev/null
+++ b/test/categories/Initialization.h
@@ -0,0 +1,207 @@
+#include "../HandmadeTest.h"
+
+TEST(Initialization, Vectors)
+{
+    //
+    // Test vec2
+    // 
+    hmm_vec2 v2 = HMM_Vec2(1.0f, 2.0f);
+    hmm_vec2 v2i = HMM_Vec2(1, 2);
+
+    EXPECT_FLOAT_EQ(v2.X, 1.0f);
+    EXPECT_FLOAT_EQ(v2.Y, 2.0f);
+    EXPECT_FLOAT_EQ(v2.U, 1.0f);
+    EXPECT_FLOAT_EQ(v2.V, 2.0f);
+    EXPECT_FLOAT_EQ(v2.Left, 1.0f);
+    EXPECT_FLOAT_EQ(v2.Right, 2.0f);
+    EXPECT_FLOAT_EQ(v2.Width, 1.0f);
+    EXPECT_FLOAT_EQ(v2.Height, 2.0f);
+    EXPECT_FLOAT_EQ(v2.Elements[0], 1.0f);
+    EXPECT_FLOAT_EQ(v2.Elements[1], 2.0f);
+
+    EXPECT_FLOAT_EQ(v2i.X, 1.0f);
+    EXPECT_FLOAT_EQ(v2i.Y, 2.0f);
+    EXPECT_FLOAT_EQ(v2i.U, 1.0f);
+    EXPECT_FLOAT_EQ(v2i.V, 2.0f);
+    EXPECT_FLOAT_EQ(v2i.Left, 1.0f);
+    EXPECT_FLOAT_EQ(v2i.Right, 2.0f);
+    EXPECT_FLOAT_EQ(v2i.Width, 1.0f);
+    EXPECT_FLOAT_EQ(v2i.Height, 2.0f);
+    EXPECT_FLOAT_EQ(v2i.Elements[0], 1.0f);
+    EXPECT_FLOAT_EQ(v2i.Elements[1], 2.0f);
+
+    //
+    // Test vec3
+    //
+    hmm_vec3 v3 = HMM_Vec3(1.0f, 2.0f, 3.0f);
+    hmm_vec3 v3i = HMM_Vec3i(1, 2, 3);
+
+    EXPECT_FLOAT_EQ(v3.X, 1.0f);
+    EXPECT_FLOAT_EQ(v3.Y, 2.0f);
+    EXPECT_FLOAT_EQ(v3.Z, 3.0f);
+    EXPECT_FLOAT_EQ(v3.U, 1.0f);
+    EXPECT_FLOAT_EQ(v3.V, 2.0f);
+    EXPECT_FLOAT_EQ(v3.W, 3.0f);
+    EXPECT_FLOAT_EQ(v3.R, 1.0f);
+    EXPECT_FLOAT_EQ(v3.G, 2.0f);
+    EXPECT_FLOAT_EQ(v3.B, 3.0f);
+    EXPECT_FLOAT_EQ(v3.Elements[0], 1.0f);
+    EXPECT_FLOAT_EQ(v3.Elements[1], 2.0f);
+    EXPECT_FLOAT_EQ(v3.Elements[2], 3.0f);
+    EXPECT_FLOAT_EQ(v3.XY.Elements[0], 1.0f);
+    EXPECT_FLOAT_EQ(v3.XY.Elements[1], 2.0f);
+    EXPECT_FLOAT_EQ(v3.YZ.Elements[0], 2.0f);
+    EXPECT_FLOAT_EQ(v3.YZ.Elements[1], 3.0f);
+    EXPECT_FLOAT_EQ(v3.UV.Elements[0], 1.0f);
+    EXPECT_FLOAT_EQ(v3.UV.Elements[1], 2.0f);
+    EXPECT_FLOAT_EQ(v3.VW.Elements[0], 2.0f);
+    EXPECT_FLOAT_EQ(v3.VW.Elements[1], 3.0f);
+
+    EXPECT_FLOAT_EQ(v3i.X, 1.0f);
+    EXPECT_FLOAT_EQ(v3i.Y, 2.0f);
+    EXPECT_FLOAT_EQ(v3i.Z, 3.0f);
+    EXPECT_FLOAT_EQ(v3i.U, 1.0f);
+    EXPECT_FLOAT_EQ(v3i.V, 2.0f);
+    EXPECT_FLOAT_EQ(v3i.W, 3.0f);
+    EXPECT_FLOAT_EQ(v3i.R, 1.0f);
+    EXPECT_FLOAT_EQ(v3i.G, 2.0f);
+    EXPECT_FLOAT_EQ(v3i.B, 3.0f);
+    EXPECT_FLOAT_EQ(v3i.Elements[0], 1.0f);
+    EXPECT_FLOAT_EQ(v3i.Elements[1], 2.0f);
+    EXPECT_FLOAT_EQ(v3i.Elements[2], 3.0f);
+    EXPECT_FLOAT_EQ(v3i.XY.Elements[0], 1.0f);
+    EXPECT_FLOAT_EQ(v3i.XY.Elements[1], 2.0f);
+    EXPECT_FLOAT_EQ(v3i.YZ.Elements[0], 2.0f);
+    EXPECT_FLOAT_EQ(v3i.YZ.Elements[1], 3.0f);
+    EXPECT_FLOAT_EQ(v3i.UV.Elements[0], 1.0f);
+    EXPECT_FLOAT_EQ(v3i.UV.Elements[1], 2.0f);
+    EXPECT_FLOAT_EQ(v3i.VW.Elements[0], 2.0f);
+    EXPECT_FLOAT_EQ(v3i.VW.Elements[1], 3.0f);
+
+    //
+    // Test vec4
+    //
+    hmm_vec4 v4 = HMM_Vec4(1.0f, 2.0f, 3.0f, 4.0f);
+    hmm_vec4 v4i = HMM_Vec4i(1, 2, 3, 4);
+    hmm_vec4 v4v = HMM_Vec4v(v3, 4.0f);
+
+    EXPECT_FLOAT_EQ(v4.X, 1.0f);
+    EXPECT_FLOAT_EQ(v4.Y, 2.0f);
+    EXPECT_FLOAT_EQ(v4.Z, 3.0f);
+    EXPECT_FLOAT_EQ(v4.W, 4.0f);
+    EXPECT_FLOAT_EQ(v4.R, 1.0f);
+    EXPECT_FLOAT_EQ(v4.G, 2.0f);
+    EXPECT_FLOAT_EQ(v4.B, 3.0f);
+    EXPECT_FLOAT_EQ(v4.A, 4.0f);
+    EXPECT_FLOAT_EQ(v4.XY.Elements[0], 1.0f);
+    EXPECT_FLOAT_EQ(v4.XY.Elements[1], 2.0f);
+    EXPECT_FLOAT_EQ(v4.YZ.Elements[0], 2.0f);
+    EXPECT_FLOAT_EQ(v4.YZ.Elements[1], 3.0f);
+    EXPECT_FLOAT_EQ(v4.ZW.Elements[0], 3.0f);
+    EXPECT_FLOAT_EQ(v4.ZW.Elements[1], 4.0f);
+    EXPECT_FLOAT_EQ(v4.XY.Elements[0], 1.0f);
+    EXPECT_FLOAT_EQ(v4.XY.Elements[1], 2.0f);
+    EXPECT_FLOAT_EQ(v4.XYZ.Elements[0], 1.0f);
+    EXPECT_FLOAT_EQ(v4.XYZ.Elements[1], 2.0f);
+    EXPECT_FLOAT_EQ(v4.XYZ.Elements[2], 3.0f);
+    EXPECT_FLOAT_EQ(v4.RGB.Elements[0], 1.0f);
+    EXPECT_FLOAT_EQ(v4.RGB.Elements[1], 2.0f);
+    EXPECT_FLOAT_EQ(v4.RGB.Elements[2], 3.0f);
+
+    EXPECT_FLOAT_EQ(v4i.X, 1.0f);
+    EXPECT_FLOAT_EQ(v4i.Y, 2.0f);
+    EXPECT_FLOAT_EQ(v4i.Z, 3.0f);
+    EXPECT_FLOAT_EQ(v4i.W, 4.0f);
+    EXPECT_FLOAT_EQ(v4i.R, 1.0f);
+    EXPECT_FLOAT_EQ(v4i.G, 2.0f);
+    EXPECT_FLOAT_EQ(v4i.B, 3.0f);
+    EXPECT_FLOAT_EQ(v4i.A, 4.0f);
+    EXPECT_FLOAT_EQ(v4i.XY.Elements[0], 1.0f);
+    EXPECT_FLOAT_EQ(v4i.XY.Elements[1], 2.0f);
+    EXPECT_FLOAT_EQ(v4i.YZ.Elements[0], 2.0f);
+    EXPECT_FLOAT_EQ(v4i.YZ.Elements[1], 3.0f);
+    EXPECT_FLOAT_EQ(v4i.ZW.Elements[0], 3.0f);
+    EXPECT_FLOAT_EQ(v4i.ZW.Elements[1], 4.0f);
+    EXPECT_FLOAT_EQ(v4i.XY.Elements[0], 1.0f);
+    EXPECT_FLOAT_EQ(v4i.XY.Elements[1], 2.0f);
+    EXPECT_FLOAT_EQ(v4i.XYZ.Elements[0], 1.0f);
+    EXPECT_FLOAT_EQ(v4i.XYZ.Elements[1], 2.0f);
+    EXPECT_FLOAT_EQ(v4i.XYZ.Elements[2], 3.0f);
+    EXPECT_FLOAT_EQ(v4i.RGB.Elements[0], 1.0f);
+    EXPECT_FLOAT_EQ(v4i.RGB.Elements[1], 2.0f);
+    EXPECT_FLOAT_EQ(v4i.RGB.Elements[2], 3.0f);
+
+    EXPECT_FLOAT_EQ(v4v.X, 1.0f);
+    EXPECT_FLOAT_EQ(v4v.Y, 2.0f);
+    EXPECT_FLOAT_EQ(v4v.Z, 3.0f);
+    EXPECT_FLOAT_EQ(v4v.W, 4.0f);
+    EXPECT_FLOAT_EQ(v4v.R, 1.0f);
+    EXPECT_FLOAT_EQ(v4v.G, 2.0f);
+    EXPECT_FLOAT_EQ(v4v.B, 3.0f);
+    EXPECT_FLOAT_EQ(v4v.A, 4.0f);
+    EXPECT_FLOAT_EQ(v4v.XY.Elements[0], 1.0f);
+    EXPECT_FLOAT_EQ(v4v.XY.Elements[1], 2.0f);
+    EXPECT_FLOAT_EQ(v4v.YZ.Elements[0], 2.0f);
+    EXPECT_FLOAT_EQ(v4v.YZ.Elements[1], 3.0f);
+    EXPECT_FLOAT_EQ(v4v.ZW.Elements[0], 3.0f);
+    EXPECT_FLOAT_EQ(v4v.ZW.Elements[1], 4.0f);
+    EXPECT_FLOAT_EQ(v4v.XY.Elements[0], 1.0f);
+    EXPECT_FLOAT_EQ(v4v.XY.Elements[1], 2.0f);
+    EXPECT_FLOAT_EQ(v4v.XYZ.Elements[0], 1.0f);
+    EXPECT_FLOAT_EQ(v4v.XYZ.Elements[1], 2.0f);
+    EXPECT_FLOAT_EQ(v4v.XYZ.Elements[2], 3.0f);
+    EXPECT_FLOAT_EQ(v4v.RGB.Elements[0], 1.0f);
+    EXPECT_FLOAT_EQ(v4v.RGB.Elements[1], 2.0f);
+    EXPECT_FLOAT_EQ(v4v.RGB.Elements[2], 3.0f);
+}
+
+TEST(Initialization, MatrixEmpty)
+{
+    hmm_mat4 m4 = HMM_Mat4();
+    for (int Column = 0; Column < 4; ++Column)
+    {
+        for (int Row = 0; Row < 4; ++Row)
+        {
+            EXPECT_FLOAT_EQ(m4.Elements[Column][Row], 0.0f);
+        }
+    }
+}
+
+TEST(Initialization, MatrixDiagonal)
+{
+    hmm_mat4 m4d = HMM_Mat4d(1.0f);
+    for (int Column = 0; Column < 4; ++Column)
+    {
+        for (int Row = 0; Row < 4; ++Row)
+        {
+            if (Column == Row) {
+                EXPECT_FLOAT_EQ(m4d.Elements[Column][Row], 1.0f);
+            } else {
+                EXPECT_FLOAT_EQ(m4d.Elements[Column][Row], 0.0f);
+            }
+        }
+    }
+}
+
+TEST(Initialization, Quaternion)
+{
+    hmm_quaternion q = HMM_Quaternion(1.0f, 2.0f, 3.0f, 4.0f);
+
+    EXPECT_FLOAT_EQ(q.X, 1.0f);
+    EXPECT_FLOAT_EQ(q.Y, 2.0f);
+    EXPECT_FLOAT_EQ(q.Z, 3.0f);
+    EXPECT_FLOAT_EQ(q.W, 4.0f);
+
+    EXPECT_FLOAT_EQ(q.Elements[0], 1.0f);
+    EXPECT_FLOAT_EQ(q.Elements[1], 2.0f);
+    EXPECT_FLOAT_EQ(q.Elements[2], 3.0f);
+    EXPECT_FLOAT_EQ(q.Elements[3], 4.0f);
+
+    hmm_vec4 v = HMM_Vec4(1.0f, 2.0f, 3.0f, 4.0f);
+    hmm_quaternion qv = HMM_QuaternionV4(v);
+
+    EXPECT_FLOAT_EQ(qv.X, 1.0f);
+    EXPECT_FLOAT_EQ(qv.Y, 2.0f);
+    EXPECT_FLOAT_EQ(qv.Z, 3.0f);
+    EXPECT_FLOAT_EQ(qv.W, 4.0f);
+}
diff --git a/test/categories/Multiplication.h b/test/categories/Multiplication.h
new file mode 100644
--- /dev/null
+++ b/test/categories/Multiplication.h
@@ -0,0 +1,536 @@
+#include "../HandmadeTest.h"
+
+TEST(Multiplication, Vec2Vec2)
+{
+    hmm_vec2 v2_1 = HMM_Vec2(1.0f, 2.0f);
+    hmm_vec2 v2_2 = HMM_Vec2(3.0f, 4.0f);
+
+    {
+        hmm_vec2 result = HMM_MultiplyVec2(v2_1, v2_2);
+        EXPECT_FLOAT_EQ(result.X, 3.0f);
+        EXPECT_FLOAT_EQ(result.Y, 8.0f);
+    }
+#ifdef __cplusplus
+    {
+        hmm_vec2 result = HMM_Multiply(v2_1, v2_2);
+        EXPECT_FLOAT_EQ(result.X, 3.0f);
+        EXPECT_FLOAT_EQ(result.Y, 8.0f);
+    }
+    {
+        hmm_vec2 result = v2_1 * v2_2;
+        EXPECT_FLOAT_EQ(result.X, 3.0f);
+        EXPECT_FLOAT_EQ(result.Y, 8.0f);
+    }
+
+    v2_1 *= v2_2;
+    EXPECT_FLOAT_EQ(v2_1.X, 3.0f);
+    EXPECT_FLOAT_EQ(v2_1.Y, 8.0f);
+#endif
+}
+
+TEST(Multiplication, Vec2Scalar)
+{
+    hmm_vec2 v2 = HMM_Vec2(1.0f, 2.0f);
+    float s = 3.0f;
+
+    {
+        hmm_vec2 result = HMM_MultiplyVec2f(v2, s);
+        EXPECT_FLOAT_EQ(result.X, 3.0f);
+        EXPECT_FLOAT_EQ(result.Y, 6.0f);
+    }
+#ifdef __cplusplus
+    {
+        hmm_vec2 result = HMM_Multiply(v2, s);
+        EXPECT_FLOAT_EQ(result.X, 3.0f);
+        EXPECT_FLOAT_EQ(result.Y, 6.0f);
+    }
+    {
+        hmm_vec2 result = v2 * s;
+        EXPECT_FLOAT_EQ(result.X, 3.0f);
+        EXPECT_FLOAT_EQ(result.Y, 6.0f);
+    }
+    {
+        hmm_vec2 result = s * v2;
+        EXPECT_FLOAT_EQ(result.X, 3.0f);
+        EXPECT_FLOAT_EQ(result.Y, 6.0f);
+    }
+
+    v2 *= s;
+    EXPECT_FLOAT_EQ(v2.X, 3.0f);
+    EXPECT_FLOAT_EQ(v2.Y, 6.0f);
+#endif
+}
+
+TEST(Multiplication, Vec3Vec3)
+{
+    hmm_vec3 v3_1 = HMM_Vec3(1.0f, 2.0f, 3.0f);
+    hmm_vec3 v3_2 = HMM_Vec3(4.0f, 5.0f, 6.0f);
+
+    {
+        hmm_vec3 result = HMM_MultiplyVec3(v3_1, v3_2);
+        EXPECT_FLOAT_EQ(result.X, 4.0f);
+        EXPECT_FLOAT_EQ(result.Y, 10.0f);
+        EXPECT_FLOAT_EQ(result.Z, 18.0f);
+    }
+#ifdef __cplusplus
+    {
+        hmm_vec3 result = HMM_Multiply(v3_1, v3_2);
+        EXPECT_FLOAT_EQ(result.X, 4.0f);
+        EXPECT_FLOAT_EQ(result.Y, 10.0f);
+        EXPECT_FLOAT_EQ(result.Z, 18.0f);
+    }
+    {
+        hmm_vec3 result = v3_1 * v3_2;
+        EXPECT_FLOAT_EQ(result.X, 4.0f);
+        EXPECT_FLOAT_EQ(result.Y, 10.0f);
+        EXPECT_FLOAT_EQ(result.Z, 18.0f);
+    }
+
+    v3_1 *= v3_2;
+    EXPECT_FLOAT_EQ(v3_1.X, 4.0f);
+    EXPECT_FLOAT_EQ(v3_1.Y, 10.0f);
+    EXPECT_FLOAT_EQ(v3_1.Z, 18.0f);
+#endif
+}
+
+TEST(Multiplication, Vec3Scalar)
+{
+    hmm_vec3 v3 = HMM_Vec3(1.0f, 2.0f, 3.0f);
+    float s = 3.0f;
+
+    {
+        hmm_vec3 result = HMM_MultiplyVec3f(v3, s);
+        EXPECT_FLOAT_EQ(result.X, 3.0f);
+        EXPECT_FLOAT_EQ(result.Y, 6.0f);
+        EXPECT_FLOAT_EQ(result.Z, 9.0f);
+    }
+#ifdef __cplusplus
+    {
+        hmm_vec3 result = HMM_Multiply(v3, s);
+        EXPECT_FLOAT_EQ(result.X, 3.0f);
+        EXPECT_FLOAT_EQ(result.Y, 6.0f);
+        EXPECT_FLOAT_EQ(result.Z, 9.0f);
+    }
+    {
+        hmm_vec3 result = v3 * s;
+        EXPECT_FLOAT_EQ(result.X, 3.0f);
+        EXPECT_FLOAT_EQ(result.Y, 6.0f);
+        EXPECT_FLOAT_EQ(result.Z, 9.0f);
+    }
+    {
+        hmm_vec3 result = s * v3;
+        EXPECT_FLOAT_EQ(result.X, 3.0f);
+        EXPECT_FLOAT_EQ(result.Y, 6.0f);
+        EXPECT_FLOAT_EQ(result.Z, 9.0f);
+    }
+
+    v3 *= s;
+    EXPECT_FLOAT_EQ(v3.X, 3.0f);
+    EXPECT_FLOAT_EQ(v3.Y, 6.0f);
+    EXPECT_FLOAT_EQ(v3.Z, 9.0f);
+#endif
+}
+
+TEST(Multiplication, Vec4Vec4)
+{
+    hmm_vec4 v4_1 = HMM_Vec4(1.0f, 2.0f, 3.0f, 4.0f);
+    hmm_vec4 v4_2 = HMM_Vec4(5.0f, 6.0f, 7.0f, 8.0f);
+
+    {
+        hmm_vec4 result = HMM_MultiplyVec4(v4_1, v4_2);
+        EXPECT_FLOAT_EQ(result.X, 5.0f);
+        EXPECT_FLOAT_EQ(result.Y, 12.0f);
+        EXPECT_FLOAT_EQ(result.Z, 21.0f);
+        EXPECT_FLOAT_EQ(result.W, 32.0f);
+    }
+#ifdef __cplusplus
+    {
+        hmm_vec4 result = HMM_Multiply(v4_1, v4_2);
+        EXPECT_FLOAT_EQ(result.X, 5.0f);
+        EXPECT_FLOAT_EQ(result.Y, 12.0f);
+        EXPECT_FLOAT_EQ(result.Z, 21.0f);
+        EXPECT_FLOAT_EQ(result.W, 32.0f);
+    }
+    {
+        hmm_vec4 result = v4_1 * v4_2;
+        EXPECT_FLOAT_EQ(result.X, 5.0f);
+        EXPECT_FLOAT_EQ(result.Y, 12.0f);
+        EXPECT_FLOAT_EQ(result.Z, 21.0f);
+        EXPECT_FLOAT_EQ(result.W, 32.0f);
+    }
+
+    v4_1 *= v4_2;
+    EXPECT_FLOAT_EQ(v4_1.X, 5.0f);
+    EXPECT_FLOAT_EQ(v4_1.Y, 12.0f);
+    EXPECT_FLOAT_EQ(v4_1.Z, 21.0f);
+    EXPECT_FLOAT_EQ(v4_1.W, 32.0f);
+#endif
+}
+
+TEST(Multiplication, Vec4Scalar)
+{
+    hmm_vec4 v4 = HMM_Vec4(1.0f, 2.0f, 3.0f, 4.0f);
+    float s = 3.0f;
+
+    {
+        hmm_vec4 result = HMM_MultiplyVec4f(v4, s);
+        EXPECT_FLOAT_EQ(result.X, 3.0f);
+        EXPECT_FLOAT_EQ(result.Y, 6.0f);
+        EXPECT_FLOAT_EQ(result.Z, 9.0f);
+        EXPECT_FLOAT_EQ(result.W, 12.0f);
+    }
+#ifdef __cplusplus
+    {
+        hmm_vec4 result = HMM_Multiply(v4, s);
+        EXPECT_FLOAT_EQ(result.X, 3.0f);
+        EXPECT_FLOAT_EQ(result.Y, 6.0f);
+        EXPECT_FLOAT_EQ(result.Z, 9.0f);
+        EXPECT_FLOAT_EQ(result.W, 12.0f);
+    }
+    {
+        hmm_vec4 result = v4 * s;
+        EXPECT_FLOAT_EQ(result.X, 3.0f);
+        EXPECT_FLOAT_EQ(result.Y, 6.0f);
+        EXPECT_FLOAT_EQ(result.Z, 9.0f);
+        EXPECT_FLOAT_EQ(result.W, 12.0f);
+    }
+    {
+        hmm_vec4 result = s * v4;
+        EXPECT_FLOAT_EQ(result.X, 3.0f);
+        EXPECT_FLOAT_EQ(result.Y, 6.0f);
+        EXPECT_FLOAT_EQ(result.Z, 9.0f);
+        EXPECT_FLOAT_EQ(result.W, 12.0f);
+    }
+
+    v4 *= s;
+    EXPECT_FLOAT_EQ(v4.X, 3.0f);
+    EXPECT_FLOAT_EQ(v4.Y, 6.0f);
+    EXPECT_FLOAT_EQ(v4.Z, 9.0f);
+#endif
+}
+
+TEST(Multiplication, Mat4Mat4)
+{
+    hmm_mat4 m4_1 = HMM_Mat4(); // will have 1 - 16
+    hmm_mat4 m4_2 = HMM_Mat4(); // will have 17 - 32
+
+    // Fill the matrices
+    int Counter = 1;
+    for (int Column = 0; Column < 4; ++Column)
+    {
+        for (int Row = 0; Row < 4; ++Row)
+        {
+            m4_1.Elements[Column][Row] = Counter;
+            ++Counter;
+        }
+    }
+    for (int Column = 0; Column < 4; ++Column)
+    {
+        for (int Row = 0; Row < 4; ++Row)
+        {
+            m4_2.Elements[Column][Row] = Counter;
+            ++Counter;
+        }
+    }
+
+    // Test the results
+    {
+        hmm_mat4 result = HMM_MultiplyMat4(m4_1, m4_2);
+        EXPECT_FLOAT_EQ(result.Elements[0][0], 538.0f);
+        EXPECT_FLOAT_EQ(result.Elements[0][1], 612.0f);
+        EXPECT_FLOAT_EQ(result.Elements[0][2], 686.0f);
+        EXPECT_FLOAT_EQ(result.Elements[0][3], 760.0f);
+        EXPECT_FLOAT_EQ(result.Elements[1][0], 650.0f);
+        EXPECT_FLOAT_EQ(result.Elements[1][1], 740.0f);
+        EXPECT_FLOAT_EQ(result.Elements[1][2], 830.0f);
+        EXPECT_FLOAT_EQ(result.Elements[1][3], 920.0f);
+        EXPECT_FLOAT_EQ(result.Elements[2][0], 762.0f);
+        EXPECT_FLOAT_EQ(result.Elements[2][1], 868.0f);
+        EXPECT_FLOAT_EQ(result.Elements[2][2], 974.0f);
+        EXPECT_FLOAT_EQ(result.Elements[2][3], 1080.0f);
+        EXPECT_FLOAT_EQ(result.Elements[3][0], 874.0f);
+        EXPECT_FLOAT_EQ(result.Elements[3][1], 996.0f);
+        EXPECT_FLOAT_EQ(result.Elements[3][2], 1118.0f);
+        EXPECT_FLOAT_EQ(result.Elements[3][3], 1240.0f);
+    }
+#ifdef __cplusplus
+    {
+        hmm_mat4 result = HMM_Multiply(m4_1, m4_2);
+        EXPECT_FLOAT_EQ(result.Elements[0][0], 538.0f);
+        EXPECT_FLOAT_EQ(result.Elements[0][1], 612.0f);
+        EXPECT_FLOAT_EQ(result.Elements[0][2], 686.0f);
+        EXPECT_FLOAT_EQ(result.Elements[0][3], 760.0f);
+        EXPECT_FLOAT_EQ(result.Elements[1][0], 650.0f);
+        EXPECT_FLOAT_EQ(result.Elements[1][1], 740.0f);
+        EXPECT_FLOAT_EQ(result.Elements[1][2], 830.0f);
+        EXPECT_FLOAT_EQ(result.Elements[1][3], 920.0f);
+        EXPECT_FLOAT_EQ(result.Elements[2][0], 762.0f);
+        EXPECT_FLOAT_EQ(result.Elements[2][1], 868.0f);
+        EXPECT_FLOAT_EQ(result.Elements[2][2], 974.0f);
+        EXPECT_FLOAT_EQ(result.Elements[2][3], 1080.0f);
+        EXPECT_FLOAT_EQ(result.Elements[3][0], 874.0f);
+        EXPECT_FLOAT_EQ(result.Elements[3][1], 996.0f);
+        EXPECT_FLOAT_EQ(result.Elements[3][2], 1118.0f);
+        EXPECT_FLOAT_EQ(result.Elements[3][3], 1240.0f);
+    }
+    {
+        hmm_mat4 result = m4_1 * m4_2;
+        EXPECT_FLOAT_EQ(result.Elements[0][0], 538.0f);
+        EXPECT_FLOAT_EQ(result.Elements[0][1], 612.0f);
+        EXPECT_FLOAT_EQ(result.Elements[0][2], 686.0f);
+        EXPECT_FLOAT_EQ(result.Elements[0][3], 760.0f);
+        EXPECT_FLOAT_EQ(result.Elements[1][0], 650.0f);
+        EXPECT_FLOAT_EQ(result.Elements[1][1], 740.0f);
+        EXPECT_FLOAT_EQ(result.Elements[1][2], 830.0f);
+        EXPECT_FLOAT_EQ(result.Elements[1][3], 920.0f);
+        EXPECT_FLOAT_EQ(result.Elements[2][0], 762.0f);
+        EXPECT_FLOAT_EQ(result.Elements[2][1], 868.0f);
+        EXPECT_FLOAT_EQ(result.Elements[2][2], 974.0f);
+        EXPECT_FLOAT_EQ(result.Elements[2][3], 1080.0f);
+        EXPECT_FLOAT_EQ(result.Elements[3][0], 874.0f);
+        EXPECT_FLOAT_EQ(result.Elements[3][1], 996.0f);
+        EXPECT_FLOAT_EQ(result.Elements[3][2], 1118.0f);
+        EXPECT_FLOAT_EQ(result.Elements[3][3], 1240.0f);
+    }
+
+    // At the time I wrote this, I intentionally omitted
+    // the *= operator for matrices because matrix
+    // multiplication is not commutative. (bvisness)
+#endif
+}
+
+TEST(Multiplication, Mat4Scalar)
+{
+    hmm_mat4 m4 = HMM_Mat4(); // will have 1 - 16
+    float s = 3;
+
+    // Fill the matrix
+    int Counter = 1;
+    for (int Column = 0; Column < 4; ++Column)
+    {
+        for (int Row = 0; Row < 4; ++Row)
+        {
+            m4.Elements[Column][Row] = Counter;
+            ++Counter;
+        }
+    }
+
+    // Test the results
+    {
+        hmm_mat4 result = HMM_MultiplyMat4f(m4, s);
+        EXPECT_FLOAT_EQ(result.Elements[0][0], 3.0f);
+        EXPECT_FLOAT_EQ(result.Elements[0][1], 6.0f);
+        EXPECT_FLOAT_EQ(result.Elements[0][2], 9.0f);
+        EXPECT_FLOAT_EQ(result.Elements[0][3], 12.0f);
+        EXPECT_FLOAT_EQ(result.Elements[1][0], 15.0f);
+        EXPECT_FLOAT_EQ(result.Elements[1][1], 18.0f);
+        EXPECT_FLOAT_EQ(result.Elements[1][2], 21.0f);
+        EXPECT_FLOAT_EQ(result.Elements[1][3], 24.0f);
+        EXPECT_FLOAT_EQ(result.Elements[2][0], 27.0f);
+        EXPECT_FLOAT_EQ(result.Elements[2][1], 30.0f);
+        EXPECT_FLOAT_EQ(result.Elements[2][2], 33.0f);
+        EXPECT_FLOAT_EQ(result.Elements[2][3], 36.0f);
+        EXPECT_FLOAT_EQ(result.Elements[3][0], 39.0f);
+        EXPECT_FLOAT_EQ(result.Elements[3][1], 42.0f);
+        EXPECT_FLOAT_EQ(result.Elements[3][2], 45.0f);
+        EXPECT_FLOAT_EQ(result.Elements[3][3], 48.0f);
+    }
+#ifdef __cplusplus
+    {
+        hmm_mat4 result = HMM_Multiply(m4, s);
+        EXPECT_FLOAT_EQ(result.Elements[0][0], 3.0f);
+        EXPECT_FLOAT_EQ(result.Elements[0][1], 6.0f);
+        EXPECT_FLOAT_EQ(result.Elements[0][2], 9.0f);
+        EXPECT_FLOAT_EQ(result.Elements[0][3], 12.0f);
+        EXPECT_FLOAT_EQ(result.Elements[1][0], 15.0f);
+        EXPECT_FLOAT_EQ(result.Elements[1][1], 18.0f);
+        EXPECT_FLOAT_EQ(result.Elements[1][2], 21.0f);
+        EXPECT_FLOAT_EQ(result.Elements[1][3], 24.0f);
+        EXPECT_FLOAT_EQ(result.Elements[2][0], 27.0f);
+        EXPECT_FLOAT_EQ(result.Elements[2][1], 30.0f);
+        EXPECT_FLOAT_EQ(result.Elements[2][2], 33.0f);
+        EXPECT_FLOAT_EQ(result.Elements[2][3], 36.0f);
+        EXPECT_FLOAT_EQ(result.Elements[3][0], 39.0f);
+        EXPECT_FLOAT_EQ(result.Elements[3][1], 42.0f);
+        EXPECT_FLOAT_EQ(result.Elements[3][2], 45.0f);
+        EXPECT_FLOAT_EQ(result.Elements[3][3], 48.0f);
+    }
+    {
+        hmm_mat4 result = m4 * s;
+        EXPECT_FLOAT_EQ(result.Elements[0][0], 3.0f);
+        EXPECT_FLOAT_EQ(result.Elements[0][1], 6.0f);
+        EXPECT_FLOAT_EQ(result.Elements[0][2], 9.0f);
+        EXPECT_FLOAT_EQ(result.Elements[0][3], 12.0f);
+        EXPECT_FLOAT_EQ(result.Elements[1][0], 15.0f);
+        EXPECT_FLOAT_EQ(result.Elements[1][1], 18.0f);
+        EXPECT_FLOAT_EQ(result.Elements[1][2], 21.0f);
+        EXPECT_FLOAT_EQ(result.Elements[1][3], 24.0f);
+        EXPECT_FLOAT_EQ(result.Elements[2][0], 27.0f);
+        EXPECT_FLOAT_EQ(result.Elements[2][1], 30.0f);
+        EXPECT_FLOAT_EQ(result.Elements[2][2], 33.0f);
+        EXPECT_FLOAT_EQ(result.Elements[2][3], 36.0f);
+        EXPECT_FLOAT_EQ(result.Elements[3][0], 39.0f);
+        EXPECT_FLOAT_EQ(result.Elements[3][1], 42.0f);
+        EXPECT_FLOAT_EQ(result.Elements[3][2], 45.0f);
+        EXPECT_FLOAT_EQ(result.Elements[3][3], 48.0f);
+    }
+    {
+        hmm_mat4 result = s * m4;
+        EXPECT_FLOAT_EQ(result.Elements[0][0], 3.0f);
+        EXPECT_FLOAT_EQ(result.Elements[0][1], 6.0f);
+        EXPECT_FLOAT_EQ(result.Elements[0][2], 9.0f);
+        EXPECT_FLOAT_EQ(result.Elements[0][3], 12.0f);
+        EXPECT_FLOAT_EQ(result.Elements[1][0], 15.0f);
+        EXPECT_FLOAT_EQ(result.Elements[1][1], 18.0f);
+        EXPECT_FLOAT_EQ(result.Elements[1][2], 21.0f);
+        EXPECT_FLOAT_EQ(result.Elements[1][3], 24.0f);
+        EXPECT_FLOAT_EQ(result.Elements[2][0], 27.0f);
+        EXPECT_FLOAT_EQ(result.Elements[2][1], 30.0f);
+        EXPECT_FLOAT_EQ(result.Elements[2][2], 33.0f);
+        EXPECT_FLOAT_EQ(result.Elements[2][3], 36.0f);
+        EXPECT_FLOAT_EQ(result.Elements[3][0], 39.0f);
+        EXPECT_FLOAT_EQ(result.Elements[3][1], 42.0f);
+        EXPECT_FLOAT_EQ(result.Elements[3][2], 45.0f);
+        EXPECT_FLOAT_EQ(result.Elements[3][3], 48.0f);
+    }
+
+    m4 *= s;
+    EXPECT_FLOAT_EQ(m4.Elements[0][0], 3.0f);
+    EXPECT_FLOAT_EQ(m4.Elements[0][1], 6.0f);
+    EXPECT_FLOAT_EQ(m4.Elements[0][2], 9.0f);
+    EXPECT_FLOAT_EQ(m4.Elements[0][3], 12.0f);
+    EXPECT_FLOAT_EQ(m4.Elements[1][0], 15.0f);
+    EXPECT_FLOAT_EQ(m4.Elements[1][1], 18.0f);
+    EXPECT_FLOAT_EQ(m4.Elements[1][2], 21.0f);
+    EXPECT_FLOAT_EQ(m4.Elements[1][3], 24.0f);
+    EXPECT_FLOAT_EQ(m4.Elements[2][0], 27.0f);
+    EXPECT_FLOAT_EQ(m4.Elements[2][1], 30.0f);
+    EXPECT_FLOAT_EQ(m4.Elements[2][2], 33.0f);
+    EXPECT_FLOAT_EQ(m4.Elements[2][3], 36.0f);
+    EXPECT_FLOAT_EQ(m4.Elements[3][0], 39.0f);
+    EXPECT_FLOAT_EQ(m4.Elements[3][1], 42.0f);
+    EXPECT_FLOAT_EQ(m4.Elements[3][2], 45.0f);
+    EXPECT_FLOAT_EQ(m4.Elements[3][3], 48.0f);
+#endif
+}
+
+TEST(Multiplication, Mat4Vec4)
+{
+    hmm_mat4 m4 = HMM_Mat4(); // will have 1 - 16
+    hmm_vec4 v4 = HMM_Vec4(1.0f, 2.0f, 3.0f, 4.0f);
+
+    // Fill the matrix
+    int Counter = 1;
+    for (int Column = 0; Column < 4; ++Column)
+    {
+        for (int Row = 0; Row < 4; ++Row)
+        {
+            m4.Elements[Column][Row] = Counter;
+            ++Counter;
+        }
+    }
+
+    // Test the results
+    {
+        hmm_vec4 result = HMM_MultiplyMat4ByVec4(m4, v4);
+        EXPECT_FLOAT_EQ(result.X, 90.0f);
+        EXPECT_FLOAT_EQ(result.Y, 100.0f);
+        EXPECT_FLOAT_EQ(result.Z, 110.0f);
+        EXPECT_FLOAT_EQ(result.W, 120.0f);
+    }
+#ifdef __cplusplus
+    {
+        hmm_vec4 result = HMM_Multiply(m4, v4);
+        EXPECT_FLOAT_EQ(result.X, 90.0f);
+        EXPECT_FLOAT_EQ(result.Y, 100.0f);
+        EXPECT_FLOAT_EQ(result.Z, 110.0f);
+        EXPECT_FLOAT_EQ(result.W, 120.0f);
+    }
+    {
+        hmm_vec4 result = m4 * v4;
+        EXPECT_FLOAT_EQ(result.X, 90.0f);
+        EXPECT_FLOAT_EQ(result.Y, 100.0f);
+        EXPECT_FLOAT_EQ(result.Z, 110.0f);
+        EXPECT_FLOAT_EQ(result.W, 120.0f);
+    }
+
+    // *= makes no sense for this particular case.
+#endif
+}
+
+TEST(Multiplication, QuaternionQuaternion)
+{
+    hmm_quaternion q1 = HMM_Quaternion(1.0f, 2.0f, 3.0f, 4.0f);
+    hmm_quaternion q2 = HMM_Quaternion(5.0f, 6.0f, 7.0f, 8.0f);
+
+    {
+        hmm_quaternion result = HMM_MultiplyQuaternion(q1, q2);
+        EXPECT_FLOAT_EQ(result.X, 24.0f);
+        EXPECT_FLOAT_EQ(result.Y, 48.0f);
+        EXPECT_FLOAT_EQ(result.Z, 48.0f);
+        EXPECT_FLOAT_EQ(result.W, -6.0f);
+    }
+#ifdef __cplusplus
+    {
+        hmm_quaternion result = HMM_Multiply(q1, q2);
+        EXPECT_FLOAT_EQ(result.X, 24.0f);
+        EXPECT_FLOAT_EQ(result.Y, 48.0f);
+        EXPECT_FLOAT_EQ(result.Z, 48.0f);
+        EXPECT_FLOAT_EQ(result.W, -6.0f);
+    }
+    {
+        hmm_quaternion result = q1 * q2;
+        EXPECT_FLOAT_EQ(result.X, 24.0f);
+        EXPECT_FLOAT_EQ(result.Y, 48.0f);
+        EXPECT_FLOAT_EQ(result.Z, 48.0f);
+        EXPECT_FLOAT_EQ(result.W, -6.0f);
+    }
+
+    // Like with matrices, we're not implementing the *=
+    // operator for quaternions because quaternion multiplication
+    // is not commutative.
+#endif
+}
+
+TEST(Multiplication, QuaternionScalar)
+{
+    hmm_quaternion q = HMM_Quaternion(1.0f, 2.0f, 3.0f, 4.0f);
+    float f = 2.0f;
+
+    {
+        hmm_quaternion result = HMM_MultiplyQuaternionF(q, f);
+        EXPECT_FLOAT_EQ(result.X, 2.0f);
+        EXPECT_FLOAT_EQ(result.Y, 4.0f);
+        EXPECT_FLOAT_EQ(result.Z, 6.0f);
+        EXPECT_FLOAT_EQ(result.W, 8.0f);
+    }
+#ifdef __cplusplus
+    {
+        hmm_quaternion result = HMM_Multiply(q, f);
+        EXPECT_FLOAT_EQ(result.X, 2.0f);
+        EXPECT_FLOAT_EQ(result.Y, 4.0f);
+        EXPECT_FLOAT_EQ(result.Z, 6.0f);
+        EXPECT_FLOAT_EQ(result.W, 8.0f);
+    }
+    {
+        hmm_quaternion result = q * f;
+        EXPECT_FLOAT_EQ(result.X, 2.0f);
+        EXPECT_FLOAT_EQ(result.Y, 4.0f);
+        EXPECT_FLOAT_EQ(result.Z, 6.0f);
+        EXPECT_FLOAT_EQ(result.W, 8.0f);
+    }
+    {
+        hmm_quaternion result = f * q;
+        EXPECT_FLOAT_EQ(result.X, 2.0f);
+        EXPECT_FLOAT_EQ(result.Y, 4.0f);
+        EXPECT_FLOAT_EQ(result.Z, 6.0f);
+        EXPECT_FLOAT_EQ(result.W, 8.0f);
+    }
+
+    q *= f;
+    EXPECT_FLOAT_EQ(q.X, 2.0f);
+    EXPECT_FLOAT_EQ(q.Y, 4.0f);
+    EXPECT_FLOAT_EQ(q.Z, 6.0f);
+    EXPECT_FLOAT_EQ(q.W, 8.0f);
+#endif
+}
diff --git a/test/categories/Projection.h b/test/categories/Projection.h
new file mode 100644
--- /dev/null
+++ b/test/categories/Projection.h
@@ -0,0 +1,36 @@
+#include "../HandmadeTest.h"
+
+TEST(Projection, Orthographic)
+{
+    hmm_mat4 projection = HMM_Orthographic(-10.0f, 10.0f, -5.0f, 5.0f, 0.0f, -10.0f);
+
+    hmm_vec3 original = HMM_Vec3(5.0f, 5.0f, -5.0f);
+    hmm_vec4 projected = HMM_MultiplyMat4ByVec4(projection, HMM_Vec4v(original, 1));
+
+    EXPECT_FLOAT_EQ(projected.X, 0.5f);
+    EXPECT_FLOAT_EQ(projected.Y, 1.0f);
+    EXPECT_FLOAT_EQ(projected.Z, -2.0f);
+    EXPECT_FLOAT_EQ(projected.W, 1.0f);
+}
+
+TEST(Projection, Perspective)
+{
+    hmm_mat4 projection = HMM_Perspective(90.0f, 2.0f, 5.0f, 15.0f);
+
+    {
+        hmm_vec3 original = HMM_Vec3(5.0f, 5.0f, -15.0f);
+        hmm_vec4 projected = HMM_MultiplyMat4ByVec4(projection, HMM_Vec4v(original, 1));
+        EXPECT_FLOAT_EQ(projected.X, 5.0f);
+        EXPECT_FLOAT_EQ(projected.Y, 10.0f);
+        EXPECT_FLOAT_EQ(projected.Z, 15.0f);
+        EXPECT_FLOAT_EQ(projected.W, 15.0f);
+    }
+    {
+        hmm_vec3 original = HMM_Vec3(5.0f, 5.0f, -5.0f);
+        hmm_vec4 projected = HMM_MultiplyMat4ByVec4(projection, HMM_Vec4v(original, 1));
+        EXPECT_FLOAT_EQ(projected.X, 5.0f);
+        EXPECT_FLOAT_EQ(projected.Y, 10.0f);
+        EXPECT_FLOAT_EQ(projected.Z, -5.0f);
+        EXPECT_FLOAT_EQ(projected.W, 5.0f);
+    }
+}
diff --git a/test/categories/QuaternionOps.h b/test/categories/QuaternionOps.h
new file mode 100644
--- /dev/null
+++ b/test/categories/QuaternionOps.h
@@ -0,0 +1,118 @@
+#include "../HandmadeTest.h"
+
+TEST(QuaternionOps, Inverse)
+{
+    hmm_quaternion q1 = HMM_Quaternion(1.0f, 2.0f, 3.0f, 4.0f);
+    hmm_quaternion inverse = HMM_InverseQuaternion(q1);
+
+    hmm_quaternion result = HMM_MultiplyQuaternion(q1, inverse);
+
+    EXPECT_FLOAT_EQ(result.X, 0.0f);
+    EXPECT_FLOAT_EQ(result.Y, 0.0f);
+    EXPECT_FLOAT_EQ(result.Z, 0.0f);
+    EXPECT_FLOAT_EQ(result.W, 1.0f);
+}
+
+TEST(QuaternionOps, Dot)
+{
+    hmm_quaternion q1 = HMM_Quaternion(1.0f, 2.0f, 3.0f, 4.0f);
+    hmm_quaternion q2 = HMM_Quaternion(5.0f, 6.0f, 7.0f, 8.0f);
+
+    {
+        float result = HMM_DotQuaternion(q1, q2);
+        EXPECT_FLOAT_EQ(result, 70.0f);
+    }
+#ifdef __cplusplus
+    {
+        float result = HMM_Dot(q1, q2);
+        EXPECT_FLOAT_EQ(result, 70.0f);
+    }
+#endif
+}
+
+TEST(QuaternionOps, Normalize)
+{
+    hmm_quaternion q = HMM_Quaternion(1.0f, 2.0f, 3.0f, 4.0f);
+
+    {
+        hmm_quaternion result = HMM_NormalizeQuaternion(q);
+        EXPECT_FLOAT_EQ(result.X, 0.1825741858f);
+        EXPECT_FLOAT_EQ(result.Y, 0.3651483717f);
+        EXPECT_FLOAT_EQ(result.Z, 0.5477225575f);
+        EXPECT_FLOAT_EQ(result.W, 0.7302967433f);
+    }
+#ifdef __cplusplus
+    {
+        hmm_quaternion result = HMM_Normalize(q);
+        EXPECT_FLOAT_EQ(result.X, 0.1825741858f);
+        EXPECT_FLOAT_EQ(result.Y, 0.3651483717f);
+        EXPECT_FLOAT_EQ(result.Z, 0.5477225575f);
+        EXPECT_FLOAT_EQ(result.W, 0.7302967433f);
+    }
+#endif
+}
+
+TEST(QuaternionOps, NLerp)
+{
+    hmm_quaternion from = HMM_Quaternion(0.0f, 0.0f, 0.0f, 1.0f);
+    hmm_quaternion to = HMM_Quaternion(0.5f, 0.5f, -0.5f, 0.5f);
+
+    hmm_quaternion result = HMM_NLerp(from, 0.5f, to);
+    EXPECT_FLOAT_EQ(result.X, 0.28867513f);
+    EXPECT_FLOAT_EQ(result.Y, 0.28867513f);
+    EXPECT_FLOAT_EQ(result.Z, -0.28867513f);
+    EXPECT_FLOAT_EQ(result.W, 0.86602540f);
+}
+
+TEST(QuaternionOps, Slerp)
+{
+    hmm_quaternion from = HMM_Quaternion(0.0f, 0.0f, 0.0f, 1.0f);
+    hmm_quaternion to = HMM_Quaternion(0.5f, 0.5f, -0.5f, 0.5f);
+
+    hmm_quaternion result = HMM_Slerp(from, 0.5f, to);
+    EXPECT_FLOAT_EQ(result.X, 0.28867513f);
+    EXPECT_FLOAT_EQ(result.Y, 0.28867513f);
+    EXPECT_FLOAT_EQ(result.Z, -0.28867513f);
+    EXPECT_FLOAT_EQ(result.W, 0.86602540f);
+}
+
+TEST(QuaternionOps, ToMat4)
+{
+    const float abs_error = 0.0001f;
+
+    hmm_quaternion rot = HMM_Quaternion(0.707107f, 0.0f, 0.0f, 0.707107f);
+
+    hmm_mat4 result = HMM_QuaternionToMat4(rot);
+
+    EXPECT_NEAR(result.Elements[0][0], 1.0f, abs_error);
+    EXPECT_NEAR(result.Elements[0][1], 0.0f, abs_error);
+    EXPECT_NEAR(result.Elements[0][2], 0.0f, abs_error);
+    EXPECT_NEAR(result.Elements[0][3], 0.0f, abs_error);
+
+    EXPECT_NEAR(result.Elements[1][0], 0.0f, abs_error);
+    EXPECT_NEAR(result.Elements[1][1], 0.0f, abs_error);
+    EXPECT_NEAR(result.Elements[1][2], 1.0f, abs_error);
+    EXPECT_NEAR(result.Elements[1][3], 0.0f, abs_error);
+
+    EXPECT_NEAR(result.Elements[2][0], 0.0f, abs_error);
+    EXPECT_NEAR(result.Elements[2][1], -1.0f, abs_error);
+    EXPECT_NEAR(result.Elements[2][2], 0.0f, abs_error);
+    EXPECT_NEAR(result.Elements[2][3], 0.0f, abs_error);
+
+    EXPECT_NEAR(result.Elements[3][0], 0.0f, abs_error);
+    EXPECT_NEAR(result.Elements[3][1], 0.0f, abs_error);
+    EXPECT_NEAR(result.Elements[3][2], 0.0f, abs_error);
+    EXPECT_NEAR(result.Elements[3][3], 1.0f, abs_error);
+}
+
+TEST(QuaternionOps, FromAxisAngle)
+{
+    hmm_vec3 axis = HMM_Vec3(1.0f, 0.0f, 0.0f);
+    float angle = HMM_PI32 / 2.0f;
+
+    hmm_quaternion result = HMM_QuaternionFromAxisAngle(axis, angle);
+    EXPECT_NEAR(result.X, 0.707107f, FLT_EPSILON * 2);
+    EXPECT_FLOAT_EQ(result.Y, 0.0f);
+    EXPECT_FLOAT_EQ(result.Z, 0.0f);
+    EXPECT_NEAR(result.W, 0.707107f, FLT_EPSILON * 2);
+}
\ No newline at end of file
diff --git a/test/categories/SSE.h b/test/categories/SSE.h
new file mode 100644
--- /dev/null
+++ b/test/categories/SSE.h
@@ -0,0 +1,41 @@
+#include "../HandmadeTest.h"
+
+#ifdef HANDMADE_MATH__USE_SSE
+
+TEST(SSE, LinearCombine)
+{
+    hmm_mat4 MatrixOne = HMM_Mat4d(2.0f);
+    hmm_mat4 MatrixTwo = HMM_Mat4d(4.0f);
+    hmm_mat4 Result;
+    
+    Result.Rows[0] = HMM_LinearCombineSSE(MatrixOne.Rows[0], MatrixTwo);
+    Result.Rows[1] = HMM_LinearCombineSSE(MatrixOne.Rows[1], MatrixTwo);
+    Result.Rows[2] = HMM_LinearCombineSSE(MatrixOne.Rows[2], MatrixTwo);
+    Result.Rows[3] = HMM_LinearCombineSSE(MatrixOne.Rows[3], MatrixTwo);
+    
+    {
+        EXPECT_FLOAT_EQ(Result.Elements[0][0], 8.0f);
+        EXPECT_FLOAT_EQ(Result.Elements[0][1], 0.0f);
+        EXPECT_FLOAT_EQ(Result.Elements[0][2], 0.0f);
+        EXPECT_FLOAT_EQ(Result.Elements[0][3], 0.0f);
+                        
+        EXPECT_FLOAT_EQ(Result.Elements[1][0], 0.0f);
+        EXPECT_FLOAT_EQ(Result.Elements[1][1], 8.0f);                
+        EXPECT_FLOAT_EQ(Result.Elements[1][2], 0.0f);
+        EXPECT_FLOAT_EQ(Result.Elements[1][3], 0.0f);
+
+                        
+        EXPECT_FLOAT_EQ(Result.Elements[2][0], 0.0f);
+        EXPECT_FLOAT_EQ(Result.Elements[2][1], 0.0f);                
+        EXPECT_FLOAT_EQ(Result.Elements[2][2], 8.0f);
+        EXPECT_FLOAT_EQ(Result.Elements[2][3], 0.0f);
+
+        
+        EXPECT_FLOAT_EQ(Result.Elements[3][0], 0.0f);
+        EXPECT_FLOAT_EQ(Result.Elements[3][1], 0.0f);                
+        EXPECT_FLOAT_EQ(Result.Elements[3][2], 0.0f);
+        EXPECT_FLOAT_EQ(Result.Elements[3][3], 8.0f);                
+    }   
+}
+
+#endif
diff --git a/test/categories/ScalarMath.h b/test/categories/ScalarMath.h
new file mode 100644
--- /dev/null
+++ b/test/categories/ScalarMath.h
@@ -0,0 +1,74 @@
+#include "../HandmadeTest.h"
+
+TEST(ScalarMath, Trigonometry)
+{
+    // We have to be a little looser with our equality constraint
+    // because of floating-point precision issues.
+    const float trigAbsError = 0.0001f;
+
+    EXPECT_NEAR(HMM_SinF(0.0f), 0.0f, trigAbsError);
+    EXPECT_NEAR(HMM_SinF(HMM_PI32 / 2), 1.0f, trigAbsError);
+    EXPECT_NEAR(HMM_SinF(HMM_PI32), 0.0f, trigAbsError);
+    EXPECT_NEAR(HMM_SinF(3 * HMM_PI32 / 2), -1.0f, trigAbsError);
+    EXPECT_NEAR(HMM_SinF(-HMM_PI32 / 2), -1.0f, trigAbsError);
+
+    EXPECT_NEAR(HMM_CosF(0.0f), 1.0f, trigAbsError);
+    EXPECT_NEAR(HMM_CosF(HMM_PI32 / 2), 0.0f, trigAbsError);
+    EXPECT_NEAR(HMM_CosF(HMM_PI32), -1.0f, trigAbsError);
+    EXPECT_NEAR(HMM_CosF(3 * HMM_PI32 / 2), 0.0f, trigAbsError);
+    EXPECT_NEAR(HMM_CosF(-HMM_PI32), -1.0f, trigAbsError);
+
+    EXPECT_NEAR(HMM_TanF(0.0f), 0.0f, trigAbsError);
+    EXPECT_NEAR(HMM_TanF(HMM_PI32 / 4), 1.0f, trigAbsError);
+    EXPECT_NEAR(HMM_TanF(3 * HMM_PI32 / 4), -1.0f, trigAbsError);
+    EXPECT_NEAR(HMM_TanF(HMM_PI32), 0.0f, trigAbsError);
+    EXPECT_NEAR(HMM_TanF(-HMM_PI32 / 4), -1.0f, trigAbsError);
+
+    // This isn't the most rigorous because we're really just sanity-
+    // checking that things work by default.
+}
+
+TEST(ScalarMath, ToRadians)
+{
+    EXPECT_FLOAT_EQ(HMM_ToRadians(0.0f), 0.0f);
+    EXPECT_FLOAT_EQ(HMM_ToRadians(180.0f), HMM_PI32);
+    EXPECT_FLOAT_EQ(HMM_ToRadians(-180.0f), -HMM_PI32);
+}
+
+TEST(ScalarMath, SquareRoot)
+{
+    EXPECT_FLOAT_EQ(HMM_SquareRootF(16.0f), 4.0f);
+}
+
+TEST(ScalarMath, RSquareRootF)
+{
+    EXPECT_NEAR(HMM_RSquareRootF(10.0f), 0.31616211f, 0.0001f);
+}
+
+TEST(ScalarMath, Power)
+{
+    EXPECT_FLOAT_EQ(HMM_Power(2.0f, 0), 1.0f);
+    EXPECT_FLOAT_EQ(HMM_Power(2.0f, 4), 16.0f);       
+    EXPECT_FLOAT_EQ(HMM_Power(2.0f, -2), 0.25f);
+}
+
+TEST(ScalarMath, PowerF)
+{
+    EXPECT_FLOAT_EQ(HMM_PowerF(2.0f, 0), 1.0f);
+    EXPECT_NEAR(HMM_PowerF(2.0f, 4.1), 17.148376f, 0.0001f);
+    EXPECT_NEAR(HMM_PowerF(2.0f, -2.5), 0.176777f, 0.0001f);
+}
+
+TEST(ScalarMath, Lerp)
+{
+    EXPECT_FLOAT_EQ(HMM_Lerp(-2.0f, 0.0f, 2.0f), -2.0f);        
+    EXPECT_FLOAT_EQ(HMM_Lerp(-2.0f, 0.5f, 2.0f), 0.0f);        
+    EXPECT_FLOAT_EQ(HMM_Lerp(-2.0f, 1.0f, 2.0f), 2.0f);
+}
+
+TEST(ScalarMath, Clamp)
+{
+    EXPECT_FLOAT_EQ(HMM_Clamp(-2.0f, 0.0f, 2.0f), 0.0f);        
+    EXPECT_FLOAT_EQ(HMM_Clamp(-2.0f, -3.0f, 2.0f), -2.0f);        
+    EXPECT_FLOAT_EQ(HMM_Clamp(-2.0f, 3.0f, 2.0f), 2.0f);
+}
diff --git a/test/categories/Subtraction.h b/test/categories/Subtraction.h
new file mode 100644
--- /dev/null
+++ b/test/categories/Subtraction.h
@@ -0,0 +1,201 @@
+#include "../HandmadeTest.h"
+
+TEST(Subtraction, Vec2)
+{
+    hmm_vec2 v2_1 = HMM_Vec2(1.0f, 2.0f);
+    hmm_vec2 v2_2 = HMM_Vec2(3.0f, 4.0f);
+
+    {
+        hmm_vec2 result = HMM_SubtractVec2(v2_1, v2_2);
+        EXPECT_FLOAT_EQ(result.X, -2.0f);
+        EXPECT_FLOAT_EQ(result.Y, -2.0f);
+    }
+#ifdef __cplusplus
+    {
+        hmm_vec2 result = HMM_Subtract(v2_1, v2_2);
+        EXPECT_FLOAT_EQ(result.X, -2.0f);
+        EXPECT_FLOAT_EQ(result.Y, -2.0f);
+    }
+    {
+        hmm_vec2 result = v2_1 - v2_2;
+        EXPECT_FLOAT_EQ(result.X, -2.0f);
+        EXPECT_FLOAT_EQ(result.Y, -2.0f);
+    }
+
+    v2_1 -= v2_2;
+    EXPECT_FLOAT_EQ(v2_1.X, -2.0f);
+    EXPECT_FLOAT_EQ(v2_1.Y, -2.0f);
+#endif
+}
+
+TEST(Subtraction, Vec3)
+{
+    hmm_vec3 v3_1 = HMM_Vec3(1.0f, 2.0f, 3.0f);
+    hmm_vec3 v3_2 = HMM_Vec3(4.0f, 5.0f, 6.0f);
+
+    {
+        hmm_vec3 result = HMM_SubtractVec3(v3_1, v3_2);
+        EXPECT_FLOAT_EQ(result.X, -3.0f);
+        EXPECT_FLOAT_EQ(result.Y, -3.0f);
+        EXPECT_FLOAT_EQ(result.Z, -3.0f);
+    }
+#ifdef __cplusplus
+    {
+        hmm_vec3 result = HMM_Subtract(v3_1, v3_2);
+        EXPECT_FLOAT_EQ(result.X, -3.0f);
+        EXPECT_FLOAT_EQ(result.Y, -3.0f);
+        EXPECT_FLOAT_EQ(result.Z, -3.0f);
+    }
+    {
+        hmm_vec3 result = v3_1 - v3_2;
+        EXPECT_FLOAT_EQ(result.X, -3.0f);
+        EXPECT_FLOAT_EQ(result.Y, -3.0f);
+        EXPECT_FLOAT_EQ(result.Z, -3.0f);
+    }
+
+    v3_1 -= v3_2;
+    EXPECT_FLOAT_EQ(v3_1.X, -3.0f);
+    EXPECT_FLOAT_EQ(v3_1.Y, -3.0f);
+    EXPECT_FLOAT_EQ(v3_1.Z, -3.0f);
+#endif
+}
+
+TEST(Subtraction, Vec4)
+{
+    hmm_vec4 v4_1 = HMM_Vec4(1.0f, 2.0f, 3.0f, 4.0f);
+    hmm_vec4 v4_2 = HMM_Vec4(5.0f, 6.0f, 7.0f, 8.0f);
+
+    {
+        hmm_vec4 result = HMM_SubtractVec4(v4_1, v4_2);
+        EXPECT_FLOAT_EQ(result.X, -4.0f);
+        EXPECT_FLOAT_EQ(result.Y, -4.0f);
+        EXPECT_FLOAT_EQ(result.Z, -4.0f);
+        EXPECT_FLOAT_EQ(result.W, -4.0f);
+    }
+#ifdef __cplusplus
+    {
+        hmm_vec4 result = HMM_Subtract(v4_1, v4_2);
+        EXPECT_FLOAT_EQ(result.X, -4.0f);
+        EXPECT_FLOAT_EQ(result.Y, -4.0f);
+        EXPECT_FLOAT_EQ(result.Z, -4.0f);
+        EXPECT_FLOAT_EQ(result.W, -4.0f);
+    }
+    {
+        hmm_vec4 result = v4_1 - v4_2;
+        EXPECT_FLOAT_EQ(result.X, -4.0f);
+        EXPECT_FLOAT_EQ(result.Y, -4.0f);
+        EXPECT_FLOAT_EQ(result.Z, -4.0f);
+        EXPECT_FLOAT_EQ(result.W, -4.0f);
+    }
+
+    v4_1 -= v4_2;
+    EXPECT_FLOAT_EQ(v4_1.X, -4.0f);
+    EXPECT_FLOAT_EQ(v4_1.Y, -4.0f);
+    EXPECT_FLOAT_EQ(v4_1.Z, -4.0f);
+    EXPECT_FLOAT_EQ(v4_1.W, -4.0f);
+#endif
+}
+
+TEST(Subtraction, Mat4)
+{
+    hmm_mat4 m4_1 = HMM_Mat4(); // will have 1 - 16
+    hmm_mat4 m4_2 = HMM_Mat4(); // will have 17 - 32
+
+    // Fill the matrices
+    int Counter = 1;
+    for (int Column = 0; Column < 4; ++Column)
+    {
+        for (int Row = 0; Row < 4; ++Row)
+        {
+            m4_1.Elements[Column][Row] = Counter;
+            ++Counter;
+        }
+    }
+    for (int Column = 0; Column < 4; ++Column)
+    {
+        for (int Row = 0; Row < 4; ++Row)
+        {
+            m4_2.Elements[Column][Row] = Counter;
+            ++Counter;
+        }
+    }
+
+    // Test the results
+    {
+        hmm_mat4 result = HMM_SubtractMat4(m4_1, m4_2);
+        for (int Column = 0; Column < 4; ++Column)
+        {
+            for (int Row = 0; Row < 4; ++Row)
+            {
+                EXPECT_FLOAT_EQ(result.Elements[Column][Row], -16.0f);
+            }
+        }
+    }
+#ifdef __cplusplus
+    {
+        hmm_mat4 result = HMM_Subtract(m4_1, m4_2);
+        for (int Column = 0; Column < 4; ++Column)
+        {
+            for (int Row = 0; Row < 4; ++Row)
+            {
+                EXPECT_FLOAT_EQ(result.Elements[Column][Row], -16.0f);
+            }
+        }
+    }
+    {
+        hmm_mat4 result = m4_1 - m4_2;
+        for (int Column = 0; Column < 4; ++Column)
+        {
+            for (int Row = 0; Row < 4; ++Row)
+            {
+                EXPECT_FLOAT_EQ(result.Elements[Column][Row], -16.0f);
+            }
+        }
+    }
+
+    m4_1 -= m4_2;
+    for (int Column = 0; Column < 4; ++Column)
+    {
+        for (int Row = 0; Row < 4; ++Row)
+        {
+            EXPECT_FLOAT_EQ(m4_1.Elements[Column][Row], -16.0f);
+        }
+    }
+#endif
+}
+
+TEST(Subtraction, Quaternion)
+{
+    hmm_quaternion q1 = HMM_Quaternion(1.0f, 2.0f, 3.0f, 4.0f);
+    hmm_quaternion q2 = HMM_Quaternion(5.0f, 6.0f, 7.0f, 8.0f);
+
+    {
+        hmm_quaternion result = HMM_SubtractQuaternion(q1, q2);
+        EXPECT_FLOAT_EQ(result.X, -4.0f);
+        EXPECT_FLOAT_EQ(result.Y, -4.0f);
+        EXPECT_FLOAT_EQ(result.Z, -4.0f);
+        EXPECT_FLOAT_EQ(result.W, -4.0f);
+    }
+#ifdef __cplusplus
+    {
+        hmm_quaternion result = HMM_Subtract(q1, q2);
+        EXPECT_FLOAT_EQ(result.X, -4.0f);
+        EXPECT_FLOAT_EQ(result.Y, -4.0f);
+        EXPECT_FLOAT_EQ(result.Z, -4.0f);
+        EXPECT_FLOAT_EQ(result.W, -4.0f);
+    }
+    {
+        hmm_quaternion result = q1 - q2;
+        EXPECT_FLOAT_EQ(result.X, -4.0f);
+        EXPECT_FLOAT_EQ(result.Y, -4.0f);
+        EXPECT_FLOAT_EQ(result.Z, -4.0f);
+        EXPECT_FLOAT_EQ(result.W, -4.0f);
+    }
+
+    q1 -= q2;
+    EXPECT_FLOAT_EQ(q1.X, -4.0f);
+    EXPECT_FLOAT_EQ(q1.Y, -4.0f);
+    EXPECT_FLOAT_EQ(q1.Z, -4.0f);
+    EXPECT_FLOAT_EQ(q1.W, -4.0f);
+#endif
+}
diff --git a/test/categories/Transformation.h b/test/categories/Transformation.h
new file mode 100644
--- /dev/null
+++ b/test/categories/Transformation.h
@@ -0,0 +1,53 @@
+#include "../HandmadeTest.h"
+
+TEST(Transformations, Translate)
+{
+    hmm_mat4 translate = HMM_Translate(HMM_Vec3(1.0f, -3.0f, 6.0f));
+
+    hmm_vec3 original = HMM_Vec3(1.0f, 2.0f, 3.0f);
+    hmm_vec4 translated = HMM_MultiplyMat4ByVec4(translate, HMM_Vec4v(original, 1));
+
+    EXPECT_FLOAT_EQ(translated.X, 2.0f);
+    EXPECT_FLOAT_EQ(translated.Y, -1.0f);
+    EXPECT_FLOAT_EQ(translated.Z, 9.0f);
+    EXPECT_FLOAT_EQ(translated.W, 1.0f);
+}
+
+TEST(Transformations, Rotate)
+{
+    hmm_vec3 original = HMM_Vec3(1.0f, 1.0f, 1.0f);
+
+    hmm_mat4 rotateX = HMM_Rotate(90, HMM_Vec3(1, 0, 0));
+    hmm_vec4 rotatedX = HMM_MultiplyMat4ByVec4(rotateX, HMM_Vec4v(original, 1));
+    EXPECT_FLOAT_EQ(rotatedX.X, 1.0f);
+    EXPECT_FLOAT_EQ(rotatedX.Y, -1.0f);
+    EXPECT_FLOAT_EQ(rotatedX.Z, 1.0f);
+    EXPECT_FLOAT_EQ(rotatedX.W, 1.0f);
+
+    hmm_mat4 rotateY = HMM_Rotate(90, HMM_Vec3(0, 1, 0));
+    hmm_vec4 rotatedY = HMM_MultiplyMat4ByVec4(rotateY, HMM_Vec4v(original, 1));
+    EXPECT_FLOAT_EQ(rotatedY.X, 1.0f);
+    EXPECT_FLOAT_EQ(rotatedY.Y, 1.0f);
+    EXPECT_FLOAT_EQ(rotatedY.Z, -1.0f);
+    EXPECT_FLOAT_EQ(rotatedY.W, 1.0f);
+
+    hmm_mat4 rotateZ = HMM_Rotate(90, HMM_Vec3(0, 0, 1));
+    hmm_vec4 rotatedZ = HMM_MultiplyMat4ByVec4(rotateZ, HMM_Vec4v(original, 1));
+    EXPECT_FLOAT_EQ(rotatedZ.X, -1.0f);
+    EXPECT_FLOAT_EQ(rotatedZ.Y, 1.0f);
+    EXPECT_FLOAT_EQ(rotatedZ.Z, 1.0f);
+    EXPECT_FLOAT_EQ(rotatedZ.W, 1.0f);
+}
+
+TEST(Transformations, Scale)
+{
+    hmm_mat4 scale = HMM_Scale(HMM_Vec3(2.0f, -3.0f, 0.5f));
+
+    hmm_vec3 original = HMM_Vec3(1.0f, 2.0f, 3.0f);
+    hmm_vec4 scaled = HMM_MultiplyMat4ByVec4(scale, HMM_Vec4v(original, 1));
+
+    EXPECT_FLOAT_EQ(scaled.X, 2.0f);
+    EXPECT_FLOAT_EQ(scaled.Y, -6.0f);
+    EXPECT_FLOAT_EQ(scaled.Z, 1.5f);
+    EXPECT_FLOAT_EQ(scaled.W, 1.0f);
+}
diff --git a/test/categories/VectorOps.h b/test/categories/VectorOps.h
new file mode 100644
--- /dev/null
+++ b/test/categories/VectorOps.h
@@ -0,0 +1,220 @@
+#include "../HandmadeTest.h"
+
+TEST(VectorOps, LengthSquared)
+{
+    hmm_vec2 v2 = HMM_Vec2(1.0f, -2.0f);
+    hmm_vec3 v3 = HMM_Vec3(1.0f, -2.0f, 3.0f); 
+    hmm_vec4 v4 = HMM_Vec4(1.0f, -2.0f, 3.0f, 1.0f);
+
+    EXPECT_FLOAT_EQ(HMM_LengthSquaredVec2(v2), 5.0f);
+    EXPECT_FLOAT_EQ(HMM_LengthSquaredVec3(v3), 14.0f);
+    EXPECT_FLOAT_EQ(HMM_LengthSquaredVec4(v4), 15.0f);
+
+#ifdef __cplusplus
+    EXPECT_FLOAT_EQ(HMM_LengthSquared(v2), 5.0f);
+    EXPECT_FLOAT_EQ(HMM_LengthSquared(v3), 14.0f);
+    EXPECT_FLOAT_EQ(HMM_LengthSquared(v4), 15.0f);
+#endif
+}
+
+TEST(VectorOps, Length)
+{
+    hmm_vec2 v2 = HMM_Vec2(1.0f, -9.0f);
+    hmm_vec3 v3 = HMM_Vec3(2.0f, -3.0f, 6.0f);
+    hmm_vec4 v4 = HMM_Vec4(2.0f, -3.0f, 6.0f, 12.0f);
+
+    EXPECT_FLOAT_EQ(HMM_LengthVec2(v2), 9.0553856f);
+    EXPECT_FLOAT_EQ(HMM_LengthVec3(v3), 7.0f);
+    EXPECT_FLOAT_EQ(HMM_LengthVec4(v4), 13.892444f);
+
+#ifdef __cplusplus
+    EXPECT_FLOAT_EQ(HMM_Length(v2), 9.0553856f);
+    EXPECT_FLOAT_EQ(HMM_Length(v3), 7.0f);
+    EXPECT_FLOAT_EQ(HMM_Length(v4), 13.892444f);
+#endif
+}
+
+TEST(VectorOps, Normalize)
+{
+    hmm_vec2 v2 = HMM_Vec2(1.0f, -2.0f);
+    hmm_vec3 v3 = HMM_Vec3(1.0f, -2.0f, 3.0f); 
+    hmm_vec4 v4 = HMM_Vec4(1.0f, -2.0f, 3.0f, -1.0f);
+
+    {
+        hmm_vec2 result = HMM_NormalizeVec2(v2);
+        EXPECT_FLOAT_EQ(HMM_LengthVec2(result), 1.0f);
+        EXPECT_GT(result.X, 0.0f);
+        EXPECT_LT(result.Y, 0.0f);
+    }
+    {
+        hmm_vec3 result = HMM_NormalizeVec3(v3);
+        EXPECT_FLOAT_EQ(HMM_LengthVec3(result), 1.0f);
+        EXPECT_GT(result.X, 0.0f);
+        EXPECT_LT(result.Y, 0.0f);
+        EXPECT_GT(result.Z, 0.0f);
+    }
+    {
+        hmm_vec4 result = HMM_NormalizeVec4(v4);
+        EXPECT_FLOAT_EQ(HMM_LengthVec4(result), 1.0f);
+        EXPECT_GT(result.X, 0.0f);
+        EXPECT_LT(result.Y, 0.0f);
+        EXPECT_GT(result.Z, 0.0f);
+        EXPECT_LT(result.W, 0.0f);
+    }
+
+#ifdef __cplusplus
+    {
+        hmm_vec2 result = HMM_Normalize(v2);
+        EXPECT_FLOAT_EQ(HMM_LengthVec2(result), 1.0f);
+        EXPECT_GT(result.X, 0.0f);
+        EXPECT_LT(result.Y, 0.0f);
+    }
+    {
+        hmm_vec3 result = HMM_Normalize(v3);
+        EXPECT_FLOAT_EQ(HMM_LengthVec3(result), 1.0f);
+        EXPECT_GT(result.X, 0.0f);
+        EXPECT_LT(result.Y, 0.0f);
+        EXPECT_GT(result.Z, 0.0f);
+    }
+    {
+        hmm_vec4 result = HMM_Normalize(v4);
+        EXPECT_FLOAT_EQ(HMM_LengthVec4(result), 1.0f);
+        EXPECT_GT(result.X, 0.0f);
+        EXPECT_LT(result.Y, 0.0f);
+        EXPECT_GT(result.Z, 0.0f);
+        EXPECT_LT(result.W, 0.0f);
+    }
+#endif
+}
+
+TEST(VectorOps, NormalizeZero)
+{
+    hmm_vec2 v2 = HMM_Vec2(0.0f, 0.0f);
+    hmm_vec3 v3 = HMM_Vec3(0.0f, 0.0f, 0.0f);
+    hmm_vec4 v4 = HMM_Vec4(0.0f, 0.0f, 0.0f, 0.0f);
+
+    {
+        hmm_vec2 result = HMM_NormalizeVec2(v2);
+        EXPECT_FLOAT_EQ(result.X, 0.0f);
+        EXPECT_FLOAT_EQ(result.Y, 0.0f);
+    }
+    {
+        hmm_vec3 result = HMM_NormalizeVec3(v3);
+        EXPECT_FLOAT_EQ(result.X, 0.0f);
+        EXPECT_FLOAT_EQ(result.Y, 0.0f);
+        EXPECT_FLOAT_EQ(result.Z, 0.0f);
+    }
+    {
+        hmm_vec4 result = HMM_NormalizeVec4(v4);
+        EXPECT_FLOAT_EQ(result.X, 0.0f);
+        EXPECT_FLOAT_EQ(result.Y, 0.0f);
+        EXPECT_FLOAT_EQ(result.Z, 0.0f);
+        EXPECT_FLOAT_EQ(result.W, 0.0f);
+    }
+
+#ifdef __cplusplus
+    {
+        hmm_vec2 result = HMM_Normalize(v2);
+        EXPECT_FLOAT_EQ(result.X, 0.0f);
+        EXPECT_FLOAT_EQ(result.Y, 0.0f);
+    }
+    {
+        hmm_vec3 result = HMM_Normalize(v3);
+        EXPECT_FLOAT_EQ(result.X, 0.0f);
+        EXPECT_FLOAT_EQ(result.Y, 0.0f);
+        EXPECT_FLOAT_EQ(result.Z, 0.0f);
+    }
+    {
+        hmm_vec4 result = HMM_Normalize(v4);
+        EXPECT_FLOAT_EQ(result.X, 0.0f);
+        EXPECT_FLOAT_EQ(result.Y, 0.0f);
+        EXPECT_FLOAT_EQ(result.Z, 0.0f);
+        EXPECT_FLOAT_EQ(result.W, 0.0f);
+    }
+#endif
+}
+
+TEST(VectorOps, Cross)
+{
+    hmm_vec3 v1 = HMM_Vec3(1.0f, 2.0f, 3.0f);
+    hmm_vec3 v2 = HMM_Vec3(4.0f, 5.0f, 6.0f);
+
+    hmm_vec3 result = HMM_Cross(v1, v2);
+
+    EXPECT_FLOAT_EQ(result.X, -3.0f);
+    EXPECT_FLOAT_EQ(result.Y, 6.0f);
+    EXPECT_FLOAT_EQ(result.Z, -3.0f);
+}
+
+TEST(VectorOps, DotVec2)
+{
+    hmm_vec2 v1 = HMM_Vec2(1.0f, 2.0f);
+    hmm_vec2 v2 = HMM_Vec2(3.0f, 4.0f);
+
+    EXPECT_FLOAT_EQ(HMM_DotVec2(v1, v2), 11.0f);
+#ifdef __cplusplus
+    EXPECT_FLOAT_EQ(HMM_Dot(v1, v2), 11.0f);
+#endif
+}
+
+TEST(VectorOps, DotVec3)
+{
+    hmm_vec3 v1 = HMM_Vec3(1.0f, 2.0f, 3.0f);
+    hmm_vec3 v2 = HMM_Vec3(4.0f, 5.0f, 6.0f);
+
+    EXPECT_FLOAT_EQ(HMM_DotVec3(v1, v2), 32.0f);
+#ifdef __cplusplus
+    EXPECT_FLOAT_EQ(HMM_Dot(v1, v2), 32.0f);
+#endif
+}
+
+TEST(VectorOps, DotVec4)
+{
+    hmm_vec4 v1 = HMM_Vec4(1.0f, 2.0f, 3.0f, 4.0f);
+    hmm_vec4 v2 = HMM_Vec4(5.0f, 6.0f, 7.0f, 8.0f);
+
+    EXPECT_FLOAT_EQ(HMM_DotVec4(v1, v2), 70.0f);
+#ifdef __cplusplus
+    EXPECT_FLOAT_EQ(HMM_Dot(v1, v2), 70.0f);
+#endif
+}
+
+
+/*
+ * MatrixOps tests
+ */
+
+TEST(MatrixOps, Transpose)
+{
+    hmm_mat4 m4 = HMM_Mat4(); // will have 1 - 16
+
+    // Fill the matrix
+    int Counter = 1;
+    for (int Column = 0; Column < 4; ++Column)
+    {
+        for (int Row = 0; Row < 4; ++Row)
+        {
+            m4.Elements[Column][Row] = Counter;
+            ++Counter;
+        }
+    }
+
+    // Test the matrix
+    hmm_mat4 result = HMM_Transpose(m4);
+    EXPECT_FLOAT_EQ(result.Elements[0][0], 1.0f);
+    EXPECT_FLOAT_EQ(result.Elements[0][1], 5.0f);
+    EXPECT_FLOAT_EQ(result.Elements[0][2], 9.0f);
+    EXPECT_FLOAT_EQ(result.Elements[0][3], 13.0f);
+    EXPECT_FLOAT_EQ(result.Elements[1][0], 2.0f);
+    EXPECT_FLOAT_EQ(result.Elements[1][1], 6.0f);
+    EXPECT_FLOAT_EQ(result.Elements[1][2], 10.0f);
+    EXPECT_FLOAT_EQ(result.Elements[1][3], 14.0f);
+    EXPECT_FLOAT_EQ(result.Elements[2][0], 3.0f);
+    EXPECT_FLOAT_EQ(result.Elements[2][1], 7.0f);
+    EXPECT_FLOAT_EQ(result.Elements[2][2], 11.0f);
+    EXPECT_FLOAT_EQ(result.Elements[2][3], 15.0f);
+    EXPECT_FLOAT_EQ(result.Elements[3][0], 4.0f);
+    EXPECT_FLOAT_EQ(result.Elements[3][1], 8.0f);
+    EXPECT_FLOAT_EQ(result.Elements[3][2], 12.0f);
+    EXPECT_FLOAT_EQ(result.Elements[3][3], 16.0f);
+}
diff --git a/test/hmm_test.c b/test/hmm_test.c
--- a/test/hmm_test.c
+++ b/test/hmm_test.c
@@ -1,2202 +1,7 @@
-#include <float.h>
-
 #include "HandmadeTest.h"
-#include "../HandmadeMath.h"
-
-int run_tests();
+#include "hmm_test.h"
 
 int main()
 {
-    run_tests();
-
-    if (hmt_count_failedtests > 0) {
-        printf(RED);
-    } else {
-        printf(GREEN);
-    }
-    printf("\n%d/%d tests passed overall, %d failures\n" RESET, hmt_count_tests - hmt_count_failedtests, hmt_count_tests, hmt_count_failures);
-
-    printf("\n");
-
-    return (hmt_count_failedtests > 0);
-}
-
-int run_tests()
-{
-    CATEGORY_BEGIN(ScalarMath)
-    {
-        TEST_BEGIN(Trigonometry)
-        {
-            // We have to be a little looser with our equality constraint
-            // because of floating-point precision issues.
-            const float trigAbsError = 0.0001f;
-
-            EXPECT_NEAR(HMM_SinF(0.0f), 0.0f, trigAbsError);
-            EXPECT_NEAR(HMM_SinF(HMM_PI32 / 2), 1.0f, trigAbsError);
-            EXPECT_NEAR(HMM_SinF(HMM_PI32), 0.0f, trigAbsError);
-            EXPECT_NEAR(HMM_SinF(3 * HMM_PI32 / 2), -1.0f, trigAbsError);
-            EXPECT_NEAR(HMM_SinF(-HMM_PI32 / 2), -1.0f, trigAbsError);
-
-            EXPECT_NEAR(HMM_CosF(0.0f), 1.0f, trigAbsError);
-            EXPECT_NEAR(HMM_CosF(HMM_PI32 / 2), 0.0f, trigAbsError);
-            EXPECT_NEAR(HMM_CosF(HMM_PI32), -1.0f, trigAbsError);
-            EXPECT_NEAR(HMM_CosF(3 * HMM_PI32 / 2), 0.0f, trigAbsError);
-            EXPECT_NEAR(HMM_CosF(-HMM_PI32), -1.0f, trigAbsError);
-
-            EXPECT_NEAR(HMM_TanF(0.0f), 0.0f, trigAbsError);
-            EXPECT_NEAR(HMM_TanF(HMM_PI32 / 4), 1.0f, trigAbsError);
-            EXPECT_NEAR(HMM_TanF(3 * HMM_PI32 / 4), -1.0f, trigAbsError);
-            EXPECT_NEAR(HMM_TanF(HMM_PI32), 0.0f, trigAbsError);
-            EXPECT_NEAR(HMM_TanF(-HMM_PI32 / 4), -1.0f, trigAbsError);
-
-            // This isn't the most rigorous because we're really just sanity-
-            // checking that things work by default.
-        }
-        TEST_END()
-
-        TEST_BEGIN(ToRadians)
-        {
-            EXPECT_FLOAT_EQ(HMM_ToRadians(0.0f), 0.0f);
-            EXPECT_FLOAT_EQ(HMM_ToRadians(180.0f), HMM_PI32);
-            EXPECT_FLOAT_EQ(HMM_ToRadians(-180.0f), -HMM_PI32);
-        }
-        TEST_END()
-
-        TEST_BEGIN(SquareRoot)
-        {
-            EXPECT_FLOAT_EQ(HMM_SquareRootF(16.0f), 4.0f);
-        }
-        TEST_END()
-
-        TEST_BEGIN(RSquareRootF)
-        {
-            EXPECT_NEAR(HMM_RSquareRootF(10.0f), 0.31616211f, 0.0001f);
-        }
-        TEST_END()
-
-        TEST_BEGIN(Power)
-        {
-            EXPECT_FLOAT_EQ(HMM_Power(2.0f, 0), 1.0f);
-            EXPECT_FLOAT_EQ(HMM_Power(2.0f, 4), 16.0f);       
-            EXPECT_FLOAT_EQ(HMM_Power(2.0f, -2), 0.25f);
-        }
-        TEST_END()
-
-        TEST_BEGIN(PowerF)
-        {
-            EXPECT_FLOAT_EQ(HMM_PowerF(2.0f, 0), 1.0f);
-            EXPECT_NEAR(HMM_PowerF(2.0f, 4.1), 17.148376f, 0.0001f);
-            EXPECT_NEAR(HMM_PowerF(2.0f, -2.5), 0.176777f, 0.0001f);
-        }
-        TEST_END()
-
-        TEST_BEGIN(Lerp)
-        {
-            EXPECT_FLOAT_EQ(HMM_Lerp(-2.0f, 0.0f, 2.0f), -2.0f);        
-            EXPECT_FLOAT_EQ(HMM_Lerp(-2.0f, 0.5f, 2.0f), 0.0f);        
-            EXPECT_FLOAT_EQ(HMM_Lerp(-2.0f, 1.0f, 2.0f), 2.0f);
-        }
-        TEST_END()
-
-        TEST_BEGIN(Clamp)
-        {
-            EXPECT_FLOAT_EQ(HMM_Clamp(-2.0f, 0.0f, 2.0f), 0.0f);        
-            EXPECT_FLOAT_EQ(HMM_Clamp(-2.0f, -3.0f, 2.0f), -2.0f);        
-            EXPECT_FLOAT_EQ(HMM_Clamp(-2.0f, 3.0f, 2.0f), 2.0f);
-        }
-        TEST_END()
-    }
-    CATEGORY_END()
-
-    CATEGORY_BEGIN(Initialization)
-    {
-        TEST_BEGIN(Vectors)
-        {
-            //
-            // Test vec2
-            // 
-            hmm_vec2 v2 = HMM_Vec2(1.0f, 2.0f);
-            hmm_vec2 v2i = HMM_Vec2(1, 2);
-
-            EXPECT_FLOAT_EQ(v2.X, 1.0f);
-            EXPECT_FLOAT_EQ(v2.Y, 2.0f);
-            EXPECT_FLOAT_EQ(v2.U, 1.0f);
-            EXPECT_FLOAT_EQ(v2.V, 2.0f);
-            EXPECT_FLOAT_EQ(v2.Left, 1.0f);
-            EXPECT_FLOAT_EQ(v2.Right, 2.0f);
-            EXPECT_FLOAT_EQ(v2.Width, 1.0f);
-            EXPECT_FLOAT_EQ(v2.Height, 2.0f);
-            EXPECT_FLOAT_EQ(v2.Elements[0], 1.0f);
-            EXPECT_FLOAT_EQ(v2.Elements[1], 2.0f);
-
-            EXPECT_FLOAT_EQ(v2i.X, 1.0f);
-            EXPECT_FLOAT_EQ(v2i.Y, 2.0f);
-            EXPECT_FLOAT_EQ(v2i.U, 1.0f);
-            EXPECT_FLOAT_EQ(v2i.V, 2.0f);
-            EXPECT_FLOAT_EQ(v2i.Left, 1.0f);
-            EXPECT_FLOAT_EQ(v2i.Right, 2.0f);
-            EXPECT_FLOAT_EQ(v2i.Width, 1.0f);
-            EXPECT_FLOAT_EQ(v2i.Height, 2.0f);
-            EXPECT_FLOAT_EQ(v2i.Elements[0], 1.0f);
-            EXPECT_FLOAT_EQ(v2i.Elements[1], 2.0f);
-
-            //
-            // Test vec3
-            //
-            hmm_vec3 v3 = HMM_Vec3(1.0f, 2.0f, 3.0f);
-            hmm_vec3 v3i = HMM_Vec3i(1, 2, 3);
-
-            EXPECT_FLOAT_EQ(v3.X, 1.0f);
-            EXPECT_FLOAT_EQ(v3.Y, 2.0f);
-            EXPECT_FLOAT_EQ(v3.Z, 3.0f);
-            EXPECT_FLOAT_EQ(v3.U, 1.0f);
-            EXPECT_FLOAT_EQ(v3.V, 2.0f);
-            EXPECT_FLOAT_EQ(v3.W, 3.0f);
-            EXPECT_FLOAT_EQ(v3.R, 1.0f);
-            EXPECT_FLOAT_EQ(v3.G, 2.0f);
-            EXPECT_FLOAT_EQ(v3.B, 3.0f);
-            EXPECT_FLOAT_EQ(v3.Elements[0], 1.0f);
-            EXPECT_FLOAT_EQ(v3.Elements[1], 2.0f);
-            EXPECT_FLOAT_EQ(v3.Elements[2], 3.0f);
-            EXPECT_FLOAT_EQ(v3.XY.Elements[0], 1.0f);
-            EXPECT_FLOAT_EQ(v3.XY.Elements[1], 2.0f);
-            EXPECT_FLOAT_EQ(v3.YZ.Elements[0], 2.0f);
-            EXPECT_FLOAT_EQ(v3.YZ.Elements[1], 3.0f);
-            EXPECT_FLOAT_EQ(v3.UV.Elements[0], 1.0f);
-            EXPECT_FLOAT_EQ(v3.UV.Elements[1], 2.0f);
-            EXPECT_FLOAT_EQ(v3.VW.Elements[0], 2.0f);
-            EXPECT_FLOAT_EQ(v3.VW.Elements[1], 3.0f);
-
-            EXPECT_FLOAT_EQ(v3i.X, 1.0f);
-            EXPECT_FLOAT_EQ(v3i.Y, 2.0f);
-            EXPECT_FLOAT_EQ(v3i.Z, 3.0f);
-            EXPECT_FLOAT_EQ(v3i.U, 1.0f);
-            EXPECT_FLOAT_EQ(v3i.V, 2.0f);
-            EXPECT_FLOAT_EQ(v3i.W, 3.0f);
-            EXPECT_FLOAT_EQ(v3i.R, 1.0f);
-            EXPECT_FLOAT_EQ(v3i.G, 2.0f);
-            EXPECT_FLOAT_EQ(v3i.B, 3.0f);
-            EXPECT_FLOAT_EQ(v3i.Elements[0], 1.0f);
-            EXPECT_FLOAT_EQ(v3i.Elements[1], 2.0f);
-            EXPECT_FLOAT_EQ(v3i.Elements[2], 3.0f);
-            EXPECT_FLOAT_EQ(v3i.XY.Elements[0], 1.0f);
-            EXPECT_FLOAT_EQ(v3i.XY.Elements[1], 2.0f);
-            EXPECT_FLOAT_EQ(v3i.YZ.Elements[0], 2.0f);
-            EXPECT_FLOAT_EQ(v3i.YZ.Elements[1], 3.0f);
-            EXPECT_FLOAT_EQ(v3i.UV.Elements[0], 1.0f);
-            EXPECT_FLOAT_EQ(v3i.UV.Elements[1], 2.0f);
-            EXPECT_FLOAT_EQ(v3i.VW.Elements[0], 2.0f);
-            EXPECT_FLOAT_EQ(v3i.VW.Elements[1], 3.0f);
-
-            //
-            // Test vec4
-            //
-            hmm_vec4 v4 = HMM_Vec4(1.0f, 2.0f, 3.0f, 4.0f);
-            hmm_vec4 v4i = HMM_Vec4i(1, 2, 3, 4);
-            hmm_vec4 v4v = HMM_Vec4v(v3, 4.0f);
-
-            EXPECT_FLOAT_EQ(v4.X, 1.0f);
-            EXPECT_FLOAT_EQ(v4.Y, 2.0f);
-            EXPECT_FLOAT_EQ(v4.Z, 3.0f);
-            EXPECT_FLOAT_EQ(v4.W, 4.0f);
-            EXPECT_FLOAT_EQ(v4.R, 1.0f);
-            EXPECT_FLOAT_EQ(v4.G, 2.0f);
-            EXPECT_FLOAT_EQ(v4.B, 3.0f);
-            EXPECT_FLOAT_EQ(v4.A, 4.0f);
-            EXPECT_FLOAT_EQ(v4.XY.Elements[0], 1.0f);
-            EXPECT_FLOAT_EQ(v4.XY.Elements[1], 2.0f);
-            EXPECT_FLOAT_EQ(v4.YZ.Elements[0], 2.0f);
-            EXPECT_FLOAT_EQ(v4.YZ.Elements[1], 3.0f);
-            EXPECT_FLOAT_EQ(v4.ZW.Elements[0], 3.0f);
-            EXPECT_FLOAT_EQ(v4.ZW.Elements[1], 4.0f);
-            EXPECT_FLOAT_EQ(v4.XY.Elements[0], 1.0f);
-            EXPECT_FLOAT_EQ(v4.XY.Elements[1], 2.0f);
-            EXPECT_FLOAT_EQ(v4.XYZ.Elements[0], 1.0f);
-            EXPECT_FLOAT_EQ(v4.XYZ.Elements[1], 2.0f);
-            EXPECT_FLOAT_EQ(v4.XYZ.Elements[2], 3.0f);
-            EXPECT_FLOAT_EQ(v4.RGB.Elements[0], 1.0f);
-            EXPECT_FLOAT_EQ(v4.RGB.Elements[1], 2.0f);
-            EXPECT_FLOAT_EQ(v4.RGB.Elements[2], 3.0f);
-
-            EXPECT_FLOAT_EQ(v4i.X, 1.0f);
-            EXPECT_FLOAT_EQ(v4i.Y, 2.0f);
-            EXPECT_FLOAT_EQ(v4i.Z, 3.0f);
-            EXPECT_FLOAT_EQ(v4i.W, 4.0f);
-            EXPECT_FLOAT_EQ(v4i.R, 1.0f);
-            EXPECT_FLOAT_EQ(v4i.G, 2.0f);
-            EXPECT_FLOAT_EQ(v4i.B, 3.0f);
-            EXPECT_FLOAT_EQ(v4i.A, 4.0f);
-            EXPECT_FLOAT_EQ(v4i.XY.Elements[0], 1.0f);
-            EXPECT_FLOAT_EQ(v4i.XY.Elements[1], 2.0f);
-            EXPECT_FLOAT_EQ(v4i.YZ.Elements[0], 2.0f);
-            EXPECT_FLOAT_EQ(v4i.YZ.Elements[1], 3.0f);
-            EXPECT_FLOAT_EQ(v4i.ZW.Elements[0], 3.0f);
-            EXPECT_FLOAT_EQ(v4i.ZW.Elements[1], 4.0f);
-            EXPECT_FLOAT_EQ(v4i.XY.Elements[0], 1.0f);
-            EXPECT_FLOAT_EQ(v4i.XY.Elements[1], 2.0f);
-            EXPECT_FLOAT_EQ(v4i.XYZ.Elements[0], 1.0f);
-            EXPECT_FLOAT_EQ(v4i.XYZ.Elements[1], 2.0f);
-            EXPECT_FLOAT_EQ(v4i.XYZ.Elements[2], 3.0f);
-            EXPECT_FLOAT_EQ(v4i.RGB.Elements[0], 1.0f);
-            EXPECT_FLOAT_EQ(v4i.RGB.Elements[1], 2.0f);
-            EXPECT_FLOAT_EQ(v4i.RGB.Elements[2], 3.0f);
-
-            EXPECT_FLOAT_EQ(v4v.X, 1.0f);
-            EXPECT_FLOAT_EQ(v4v.Y, 2.0f);
-            EXPECT_FLOAT_EQ(v4v.Z, 3.0f);
-            EXPECT_FLOAT_EQ(v4v.W, 4.0f);
-            EXPECT_FLOAT_EQ(v4v.R, 1.0f);
-            EXPECT_FLOAT_EQ(v4v.G, 2.0f);
-            EXPECT_FLOAT_EQ(v4v.B, 3.0f);
-            EXPECT_FLOAT_EQ(v4v.A, 4.0f);
-            EXPECT_FLOAT_EQ(v4v.XY.Elements[0], 1.0f);
-            EXPECT_FLOAT_EQ(v4v.XY.Elements[1], 2.0f);
-            EXPECT_FLOAT_EQ(v4v.YZ.Elements[0], 2.0f);
-            EXPECT_FLOAT_EQ(v4v.YZ.Elements[1], 3.0f);
-            EXPECT_FLOAT_EQ(v4v.ZW.Elements[0], 3.0f);
-            EXPECT_FLOAT_EQ(v4v.ZW.Elements[1], 4.0f);
-            EXPECT_FLOAT_EQ(v4v.XY.Elements[0], 1.0f);
-            EXPECT_FLOAT_EQ(v4v.XY.Elements[1], 2.0f);
-            EXPECT_FLOAT_EQ(v4v.XYZ.Elements[0], 1.0f);
-            EXPECT_FLOAT_EQ(v4v.XYZ.Elements[1], 2.0f);
-            EXPECT_FLOAT_EQ(v4v.XYZ.Elements[2], 3.0f);
-            EXPECT_FLOAT_EQ(v4v.RGB.Elements[0], 1.0f);
-            EXPECT_FLOAT_EQ(v4v.RGB.Elements[1], 2.0f);
-            EXPECT_FLOAT_EQ(v4v.RGB.Elements[2], 3.0f);
-        }
-        TEST_END()
-
-        TEST_BEGIN(MatrixEmpty)
-        {
-            hmm_mat4 m4 = HMM_Mat4();
-            for (int Column = 0; Column < 4; ++Column)
-            {
-                for (int Row = 0; Row < 4; ++Row)
-                {
-                    EXPECT_FLOAT_EQ(m4.Elements[Column][Row], 0.0f);
-                }
-            }
-        }
-        TEST_END()
-
-        TEST_BEGIN(MatrixDiagonal)
-        {
-            hmm_mat4 m4d = HMM_Mat4d(1.0f);
-            for (int Column = 0; Column < 4; ++Column)
-            {
-                for (int Row = 0; Row < 4; ++Row)
-                {
-                    if (Column == Row) {
-                        EXPECT_FLOAT_EQ(m4d.Elements[Column][Row], 1.0f);
-                    } else {
-                        EXPECT_FLOAT_EQ(m4d.Elements[Column][Row], 0.0f);
-                    }
-                }
-            }
-        }
-        TEST_END()
-
-        TEST_BEGIN(Quaternion)
-        {
-            hmm_quaternion q = HMM_Quaternion(1.0f, 2.0f, 3.0f, 4.0f);
-
-            EXPECT_FLOAT_EQ(q.X, 1.0f);
-            EXPECT_FLOAT_EQ(q.Y, 2.0f);
-            EXPECT_FLOAT_EQ(q.Z, 3.0f);
-            EXPECT_FLOAT_EQ(q.W, 4.0f);
-
-            EXPECT_FLOAT_EQ(q.Elements[0], 1.0f);
-            EXPECT_FLOAT_EQ(q.Elements[1], 2.0f);
-            EXPECT_FLOAT_EQ(q.Elements[2], 3.0f);
-            EXPECT_FLOAT_EQ(q.Elements[3], 4.0f);
-
-            hmm_vec4 v = HMM_Vec4(1.0f, 2.0f, 3.0f, 4.0f);
-            hmm_quaternion qv = HMM_QuaternionV4(v);
-
-            EXPECT_FLOAT_EQ(qv.X, 1.0f);
-            EXPECT_FLOAT_EQ(qv.Y, 2.0f);
-            EXPECT_FLOAT_EQ(qv.Z, 3.0f);
-            EXPECT_FLOAT_EQ(qv.W, 4.0f);
-        }
-        TEST_END()
-    }
-    CATEGORY_END()
-
-    CATEGORY_BEGIN(VectorOps)
-    {
-        TEST_BEGIN(LengthSquared)
-        {
-            hmm_vec2 v2 = HMM_Vec2(1.0f, -2.0f);
-            hmm_vec3 v3 = HMM_Vec3(1.0f, -2.0f, 3.0f); 
-            hmm_vec4 v4 = HMM_Vec4(1.0f, -2.0f, 3.0f, 1.0f);
-
-            EXPECT_FLOAT_EQ(HMM_LengthSquaredVec2(v2), 5.0f);
-            EXPECT_FLOAT_EQ(HMM_LengthSquaredVec3(v3), 14.0f);
-            EXPECT_FLOAT_EQ(HMM_LengthSquaredVec4(v4), 15.0f);
-
-#ifdef __cplusplus
-            EXPECT_FLOAT_EQ(HMM_LengthSquared(v2), 5.0f);
-            EXPECT_FLOAT_EQ(HMM_LengthSquared(v3), 14.0f);
-            EXPECT_FLOAT_EQ(HMM_LengthSquared(v4), 15.0f);
-#endif
-        }
-        TEST_END()
-
-        TEST_BEGIN(Length)
-        {
-            hmm_vec2 v2 = HMM_Vec2(1.0f, -9.0f);
-            hmm_vec3 v3 = HMM_Vec3(2.0f, -3.0f, 6.0f);
-            hmm_vec4 v4 = HMM_Vec4(2.0f, -3.0f, 6.0f, 12.0f);
-
-            EXPECT_FLOAT_EQ(HMM_LengthVec2(v2), 9.0553856f);
-            EXPECT_FLOAT_EQ(HMM_LengthVec3(v3), 7.0f);
-            EXPECT_FLOAT_EQ(HMM_LengthVec4(v4), 13.892444f);
-
-#ifdef __cplusplus
-            EXPECT_FLOAT_EQ(HMM_Length(v2), 9.0553856f);
-            EXPECT_FLOAT_EQ(HMM_Length(v3), 7.0f);
-            EXPECT_FLOAT_EQ(HMM_Length(v4), 13.892444f);
-#endif
-        }
-        TEST_END()
-
-        TEST_BEGIN(Normalize)
-        {
-            hmm_vec2 v2 = HMM_Vec2(1.0f, -2.0f);
-            hmm_vec3 v3 = HMM_Vec3(1.0f, -2.0f, 3.0f); 
-            hmm_vec4 v4 = HMM_Vec4(1.0f, -2.0f, 3.0f, -1.0f);
-
-            {
-                hmm_vec2 result = HMM_NormalizeVec2(v2);
-                EXPECT_FLOAT_EQ(HMM_LengthVec2(result), 1.0f);
-                EXPECT_GT(result.X, 0.0f);
-                EXPECT_LT(result.Y, 0.0f);
-            }
-            {
-                hmm_vec3 result = HMM_NormalizeVec3(v3);
-                EXPECT_FLOAT_EQ(HMM_LengthVec3(result), 1.0f);
-                EXPECT_GT(result.X, 0.0f);
-                EXPECT_LT(result.Y, 0.0f);
-                EXPECT_GT(result.Z, 0.0f);
-            }
-            {
-                hmm_vec4 result = HMM_NormalizeVec4(v4);
-                EXPECT_FLOAT_EQ(HMM_LengthVec4(result), 1.0f);
-                EXPECT_GT(result.X, 0.0f);
-                EXPECT_LT(result.Y, 0.0f);
-                EXPECT_GT(result.Z, 0.0f);
-                EXPECT_LT(result.W, 0.0f);
-            }
-
-#ifdef __cplusplus
-            {
-                hmm_vec2 result = HMM_Normalize(v2);
-                EXPECT_FLOAT_EQ(HMM_LengthVec2(result), 1.0f);
-                EXPECT_GT(result.X, 0.0f);
-                EXPECT_LT(result.Y, 0.0f);
-            }
-            {
-                hmm_vec3 result = HMM_Normalize(v3);
-                EXPECT_FLOAT_EQ(HMM_LengthVec3(result), 1.0f);
-                EXPECT_GT(result.X, 0.0f);
-                EXPECT_LT(result.Y, 0.0f);
-                EXPECT_GT(result.Z, 0.0f);
-            }
-            {
-                hmm_vec4 result = HMM_Normalize(v4);
-                EXPECT_FLOAT_EQ(HMM_LengthVec4(result), 1.0f);
-                EXPECT_GT(result.X, 0.0f);
-                EXPECT_LT(result.Y, 0.0f);
-                EXPECT_GT(result.Z, 0.0f);
-                EXPECT_LT(result.W, 0.0f);
-            }
-#endif
-        }
-        TEST_END()
-
-        TEST_BEGIN(NormalizeZero)
-        {
-            hmm_vec2 v2 = HMM_Vec2(0.0f, 0.0f);
-            hmm_vec3 v3 = HMM_Vec3(0.0f, 0.0f, 0.0f);
-            hmm_vec4 v4 = HMM_Vec4(0.0f, 0.0f, 0.0f, 0.0f);
-
-            {
-                hmm_vec2 result = HMM_NormalizeVec2(v2);
-                EXPECT_FLOAT_EQ(result.X, 0.0f);
-                EXPECT_FLOAT_EQ(result.Y, 0.0f);
-            }
-            {
-                hmm_vec3 result = HMM_NormalizeVec3(v3);
-                EXPECT_FLOAT_EQ(result.X, 0.0f);
-                EXPECT_FLOAT_EQ(result.Y, 0.0f);
-                EXPECT_FLOAT_EQ(result.Z, 0.0f);
-            }
-            {
-                hmm_vec4 result = HMM_NormalizeVec4(v4);
-                EXPECT_FLOAT_EQ(result.X, 0.0f);
-                EXPECT_FLOAT_EQ(result.Y, 0.0f);
-                EXPECT_FLOAT_EQ(result.Z, 0.0f);
-                EXPECT_FLOAT_EQ(result.W, 0.0f);
-            }
-
-#ifdef __cplusplus
-            {
-                hmm_vec2 result = HMM_Normalize(v2);
-                EXPECT_FLOAT_EQ(result.X, 0.0f);
-                EXPECT_FLOAT_EQ(result.Y, 0.0f);
-            }
-            {
-                hmm_vec3 result = HMM_Normalize(v3);
-                EXPECT_FLOAT_EQ(result.X, 0.0f);
-                EXPECT_FLOAT_EQ(result.Y, 0.0f);
-                EXPECT_FLOAT_EQ(result.Z, 0.0f);
-            }
-            {
-                hmm_vec4 result = HMM_Normalize(v4);
-                EXPECT_FLOAT_EQ(result.X, 0.0f);
-                EXPECT_FLOAT_EQ(result.Y, 0.0f);
-                EXPECT_FLOAT_EQ(result.Z, 0.0f);
-                EXPECT_FLOAT_EQ(result.W, 0.0f);
-            }
-#endif
-        }
-        TEST_END()
-
-        TEST_BEGIN(Cross)
-        {
-            hmm_vec3 v1 = HMM_Vec3(1.0f, 2.0f, 3.0f);
-            hmm_vec3 v2 = HMM_Vec3(4.0f, 5.0f, 6.0f);
-
-            hmm_vec3 result = HMM_Cross(v1, v2);
-
-            EXPECT_FLOAT_EQ(result.X, -3.0f);
-            EXPECT_FLOAT_EQ(result.Y, 6.0f);
-            EXPECT_FLOAT_EQ(result.Z, -3.0f);
-        }
-        TEST_END()
-
-        TEST_BEGIN(DotVec2)
-        {
-            hmm_vec2 v1 = HMM_Vec2(1.0f, 2.0f);
-            hmm_vec2 v2 = HMM_Vec2(3.0f, 4.0f);
-
-            EXPECT_FLOAT_EQ(HMM_DotVec2(v1, v2), 11.0f);
-#ifdef __cplusplus
-            EXPECT_FLOAT_EQ(HMM_Dot(v1, v2), 11.0f);
-#endif
-        }
-        TEST_END()
-
-        TEST_BEGIN(DotVec3)
-        {
-            hmm_vec3 v1 = HMM_Vec3(1.0f, 2.0f, 3.0f);
-            hmm_vec3 v2 = HMM_Vec3(4.0f, 5.0f, 6.0f);
-
-            EXPECT_FLOAT_EQ(HMM_DotVec3(v1, v2), 32.0f);
-#ifdef __cplusplus
-            EXPECT_FLOAT_EQ(HMM_Dot(v1, v2), 32.0f);
-#endif
-        }
-        TEST_END()
-
-        TEST_BEGIN(DotVec4)
-        {
-            hmm_vec4 v1 = HMM_Vec4(1.0f, 2.0f, 3.0f, 4.0f);
-            hmm_vec4 v2 = HMM_Vec4(5.0f, 6.0f, 7.0f, 8.0f);
-
-            EXPECT_FLOAT_EQ(HMM_DotVec4(v1, v2), 70.0f);
-#ifdef __cplusplus
-            EXPECT_FLOAT_EQ(HMM_Dot(v1, v2), 70.0f);
-#endif
-        }
-        TEST_END()
-    }
-    CATEGORY_END()
-
-    CATEGORY_BEGIN(MatrixOps)
-    {
-        TEST_BEGIN(Transpose)
-        {
-            hmm_mat4 m4 = HMM_Mat4(); // will have 1 - 16
-
-            // Fill the matrix
-            int Counter = 1;
-            for (int Column = 0; Column < 4; ++Column)
-            {
-                for (int Row = 0; Row < 4; ++Row)
-                {
-                    m4.Elements[Column][Row] = Counter;
-                    ++Counter;
-                }
-            }
-
-            // Test the matrix
-            hmm_mat4 result = HMM_Transpose(m4);
-            EXPECT_FLOAT_EQ(result.Elements[0][0], 1.0f);
-            EXPECT_FLOAT_EQ(result.Elements[0][1], 5.0f);
-            EXPECT_FLOAT_EQ(result.Elements[0][2], 9.0f);
-            EXPECT_FLOAT_EQ(result.Elements[0][3], 13.0f);
-            EXPECT_FLOAT_EQ(result.Elements[1][0], 2.0f);
-            EXPECT_FLOAT_EQ(result.Elements[1][1], 6.0f);
-            EXPECT_FLOAT_EQ(result.Elements[1][2], 10.0f);
-            EXPECT_FLOAT_EQ(result.Elements[1][3], 14.0f);
-            EXPECT_FLOAT_EQ(result.Elements[2][0], 3.0f);
-            EXPECT_FLOAT_EQ(result.Elements[2][1], 7.0f);
-            EXPECT_FLOAT_EQ(result.Elements[2][2], 11.0f);
-            EXPECT_FLOAT_EQ(result.Elements[2][3], 15.0f);
-            EXPECT_FLOAT_EQ(result.Elements[3][0], 4.0f);
-            EXPECT_FLOAT_EQ(result.Elements[3][1], 8.0f);
-            EXPECT_FLOAT_EQ(result.Elements[3][2], 12.0f);
-            EXPECT_FLOAT_EQ(result.Elements[3][3], 16.0f);
-        }
-        TEST_END()
-    }
-    CATEGORY_END()
-
-    CATEGORY_BEGIN(QuaternionOps)
-    {
-        TEST_BEGIN(Inverse)
-        {
-            hmm_quaternion q1 = HMM_Quaternion(1.0f, 2.0f, 3.0f, 4.0f);
-            hmm_quaternion inverse = HMM_InverseQuaternion(q1);
-
-            hmm_quaternion result = HMM_MultiplyQuaternion(q1, inverse);
-
-            EXPECT_FLOAT_EQ(result.X, 0.0f);
-            EXPECT_FLOAT_EQ(result.Y, 0.0f);
-            EXPECT_FLOAT_EQ(result.Z, 0.0f);
-            EXPECT_FLOAT_EQ(result.W, 1.0f);
-        }
-        TEST_END()
-
-        TEST_BEGIN(Dot)
-        {
-            hmm_quaternion q1 = HMM_Quaternion(1.0f, 2.0f, 3.0f, 4.0f);
-            hmm_quaternion q2 = HMM_Quaternion(5.0f, 6.0f, 7.0f, 8.0f);
-
-            {
-                float result = HMM_DotQuaternion(q1, q2);
-                EXPECT_FLOAT_EQ(result, 70.0f);
-            }
-#ifdef __cplusplus
-            {
-                float result = HMM_Dot(q1, q2);
-                EXPECT_FLOAT_EQ(result, 70.0f);
-            }
-#endif
-        }
-        TEST_END()
-
-        TEST_BEGIN(Normalize)
-        {
-            hmm_quaternion q = HMM_Quaternion(1.0f, 2.0f, 3.0f, 4.0f);
-
-            {
-                hmm_quaternion result = HMM_NormalizeQuaternion(q);
-                EXPECT_FLOAT_EQ(result.X, 0.1825741858f);
-                EXPECT_FLOAT_EQ(result.Y, 0.3651483717f);
-                EXPECT_FLOAT_EQ(result.Z, 0.5477225575f);
-                EXPECT_FLOAT_EQ(result.W, 0.7302967433f);
-            }
-#ifdef __cplusplus
-            {
-                hmm_quaternion result = HMM_Normalize(q);
-                EXPECT_FLOAT_EQ(result.X, 0.1825741858f);
-                EXPECT_FLOAT_EQ(result.Y, 0.3651483717f);
-                EXPECT_FLOAT_EQ(result.Z, 0.5477225575f);
-                EXPECT_FLOAT_EQ(result.W, 0.7302967433f);
-            }
-#endif
-        }
-        TEST_END()
-
-        TEST_BEGIN(NLerp)
-        {
-            hmm_quaternion from = HMM_Quaternion(0.0f, 0.0f, 0.0f, 1.0f);
-            hmm_quaternion to = HMM_Quaternion(0.5f, 0.5f, -0.5f, 0.5f);
-
-            hmm_quaternion result = HMM_NLerp(from, 0.5f, to);
-            EXPECT_FLOAT_EQ(result.X, 0.28867513f);
-            EXPECT_FLOAT_EQ(result.Y, 0.28867513f);
-            EXPECT_FLOAT_EQ(result.Z, -0.28867513f);
-            EXPECT_FLOAT_EQ(result.W, 0.86602540f);
-        }
-        TEST_END()
-
-        TEST_BEGIN(Slerp)
-        {
-            hmm_quaternion from = HMM_Quaternion(0.0f, 0.0f, 0.0f, 1.0f);
-            hmm_quaternion to = HMM_Quaternion(0.5f, 0.5f, -0.5f, 0.5f);
-
-            hmm_quaternion result = HMM_Slerp(from, 0.5f, to);
-            EXPECT_FLOAT_EQ(result.X, 0.28867513f);
-            EXPECT_FLOAT_EQ(result.Y, 0.28867513f);
-            EXPECT_FLOAT_EQ(result.Z, -0.28867513f);
-            EXPECT_FLOAT_EQ(result.W, 0.86602540f);
-        }
-        TEST_END()
-
-        TEST_BEGIN(ToMat4)
-        {
-            const float abs_error = 0.0001f;
-
-            hmm_quaternion rot = HMM_Quaternion(0.707107f, 0.0f, 0.0f, 0.707107f);
-
-            hmm_mat4 result = HMM_QuaternionToMat4(rot);
-
-            EXPECT_NEAR(result.Elements[0][0], 1.0f, abs_error);
-            EXPECT_NEAR(result.Elements[0][1], 0.0f, abs_error);
-            EXPECT_NEAR(result.Elements[0][2], 0.0f, abs_error);
-            EXPECT_NEAR(result.Elements[0][3], 0.0f, abs_error);
-
-            EXPECT_NEAR(result.Elements[1][0], 0.0f, abs_error);
-            EXPECT_NEAR(result.Elements[1][1], 0.0f, abs_error);
-            EXPECT_NEAR(result.Elements[1][2], 1.0f, abs_error);
-            EXPECT_NEAR(result.Elements[1][3], 0.0f, abs_error);
-
-            EXPECT_NEAR(result.Elements[2][0], 0.0f, abs_error);
-            EXPECT_NEAR(result.Elements[2][1], -1.0f, abs_error);
-            EXPECT_NEAR(result.Elements[2][2], 0.0f, abs_error);
-            EXPECT_NEAR(result.Elements[2][3], 0.0f, abs_error);
-
-            EXPECT_NEAR(result.Elements[3][0], 0.0f, abs_error);
-            EXPECT_NEAR(result.Elements[3][1], 0.0f, abs_error);
-            EXPECT_NEAR(result.Elements[3][2], 0.0f, abs_error);
-            EXPECT_NEAR(result.Elements[3][3], 1.0f, abs_error);
-        }
-        TEST_END()
-
-        TEST_BEGIN(FromAxisAngle)
-        {
-            hmm_vec3 axis = HMM_Vec3(1.0f, 0.0f, 0.0f);
-            float angle = HMM_PI32 / 2.0f;
-
-            hmm_quaternion result = HMM_QuaternionFromAxisAngle(axis, angle);
-            EXPECT_NEAR(result.X, 0.707107f, FLT_EPSILON * 2);
-            EXPECT_FLOAT_EQ(result.Y, 0.0f);
-            EXPECT_FLOAT_EQ(result.Z, 0.0f);
-            EXPECT_NEAR(result.W, 0.707107f, FLT_EPSILON * 2);
-        }
-        TEST_END()
-    }
-    CATEGORY_END()
-
-    CATEGORY_BEGIN(Addition)
-    {
-        TEST_BEGIN(Vec2)
-        {
-            hmm_vec2 v2_1 = HMM_Vec2(1.0f, 2.0f);
-            hmm_vec2 v2_2 = HMM_Vec2(3.0f, 4.0f);
-
-            {
-                hmm_vec2 result = HMM_AddVec2(v2_1, v2_2);
-                EXPECT_FLOAT_EQ(result.X, 4.0f);
-                EXPECT_FLOAT_EQ(result.Y, 6.0f);
-            }
-#ifdef __cplusplus
-            {
-                hmm_vec2 result = HMM_Add(v2_1, v2_2);
-                EXPECT_FLOAT_EQ(result.X, 4.0f);
-                EXPECT_FLOAT_EQ(result.Y, 6.0f);
-            }
-            {
-                hmm_vec2 result = v2_1 + v2_2;
-                EXPECT_FLOAT_EQ(result.X, 4.0f);
-                EXPECT_FLOAT_EQ(result.Y, 6.0f);
-            }
-
-            v2_1 += v2_2;
-            EXPECT_FLOAT_EQ(v2_1.X, 4.0f);
-            EXPECT_FLOAT_EQ(v2_1.Y, 6.0f);
-#endif
-        }
-        TEST_END()
-
-        TEST_BEGIN(Vec3)
-        {
-            hmm_vec3 v3_1 = HMM_Vec3(1.0f, 2.0f, 3.0f);
-            hmm_vec3 v3_2 = HMM_Vec3(4.0f, 5.0f, 6.0f);
-
-            {
-                hmm_vec3 result = HMM_AddVec3(v3_1, v3_2);
-                EXPECT_FLOAT_EQ(result.X, 5.0f);
-                EXPECT_FLOAT_EQ(result.Y, 7.0f);
-                EXPECT_FLOAT_EQ(result.Z, 9.0f);    
-            }
-#ifdef __cplusplus
-            {
-                hmm_vec3 result = HMM_Add(v3_1, v3_2);
-                EXPECT_FLOAT_EQ(result.X, 5.0f);
-                EXPECT_FLOAT_EQ(result.Y, 7.0f);
-                EXPECT_FLOAT_EQ(result.Z, 9.0f);
-            }
-            {
-                hmm_vec3 result = v3_1 + v3_2;
-                EXPECT_FLOAT_EQ(result.X, 5.0f);
-                EXPECT_FLOAT_EQ(result.Y, 7.0f);
-                EXPECT_FLOAT_EQ(result.Z, 9.0f);
-            }
-
-            v3_1 += v3_2;
-            EXPECT_FLOAT_EQ(v3_1.X, 5.0f);
-            EXPECT_FLOAT_EQ(v3_1.Y, 7.0f);
-            EXPECT_FLOAT_EQ(v3_1.Z, 9.0f);
-#endif
-        }
-        TEST_END()
-
-        TEST_BEGIN(Vec4)
-        {
-            hmm_vec4 v4_1 = HMM_Vec4(1.0f, 2.0f, 3.0f, 4.0f);
-            hmm_vec4 v4_2 = HMM_Vec4(5.0f, 6.0f, 7.0f, 8.0f);
-            
-            {
-                hmm_vec4 result = HMM_AddVec4(v4_1, v4_2);
-                EXPECT_FLOAT_EQ(result.X, 6.0f);
-                EXPECT_FLOAT_EQ(result.Y, 8.0f);
-                EXPECT_FLOAT_EQ(result.Z, 10.0f);
-                EXPECT_FLOAT_EQ(result.W, 12.0f);
-            }
-#ifdef __cplusplus
-            {
-                hmm_vec4 result = HMM_Add(v4_1, v4_2);
-                EXPECT_FLOAT_EQ(result.X, 6.0f);
-                EXPECT_FLOAT_EQ(result.Y, 8.0f);
-                EXPECT_FLOAT_EQ(result.Z, 10.0f);
-                EXPECT_FLOAT_EQ(result.W, 12.0f);
-            }
-            {
-                hmm_vec4 result = v4_1 + v4_2;
-                EXPECT_FLOAT_EQ(result.X, 6.0f);
-                EXPECT_FLOAT_EQ(result.Y, 8.0f);
-                EXPECT_FLOAT_EQ(result.Z, 10.0f);
-                EXPECT_FLOAT_EQ(result.W, 12.0f);
-            }
-
-            v4_1 += v4_2;
-            EXPECT_FLOAT_EQ(v4_1.X, 6.0f);
-            EXPECT_FLOAT_EQ(v4_1.Y, 8.0f);
-            EXPECT_FLOAT_EQ(v4_1.Z, 10.0f);
-            EXPECT_FLOAT_EQ(v4_1.W, 12.0f);
-#endif
-        }
-        TEST_END()
-
-        TEST_BEGIN(Mat4)
-        {
-            hmm_mat4 m4_1 = HMM_Mat4(); // will have 1 - 16
-            hmm_mat4 m4_2 = HMM_Mat4(); // will have 17 - 32
-
-            // Fill the matrices
-            int Counter = 1;
-            for (int Column = 0; Column < 4; ++Column)
-            {
-                for (int Row = 0; Row < 4; ++Row)
-                {
-                    m4_1.Elements[Column][Row] = Counter;
-                    ++Counter;
-                }
-            }
-            for (int Column = 0; Column < 4; ++Column)
-            {
-                for (int Row = 0; Row < 4; ++Row)
-                {
-                    m4_2.Elements[Column][Row] = Counter;
-                    ++Counter;
-                }
-            }
-
-            // Test the results
-            {
-                hmm_mat4 result = HMM_AddMat4(m4_1, m4_2);
-                float Expected = 18.0f;
-                for (int Column = 0; Column < 4; ++Column)
-                {
-                    for (int Row = 0; Row < 4; ++Row)
-                    {
-                        EXPECT_FLOAT_EQ(result.Elements[Column][Row], Expected);
-                        Expected += 2.0f;
-                    }
-                }
-            }
-#ifdef __cplusplus
-            {
-                hmm_mat4 result = HMM_Add(m4_1, m4_2);
-                float Expected = 18.0f;
-                for (int Column = 0; Column < 4; ++Column)
-                {
-                    for (int Row = 0; Row < 4; ++Row)
-                    {
-                        EXPECT_FLOAT_EQ(result.Elements[Column][Row], Expected);
-                        Expected += 2.0f;
-                    }
-                }
-            }
-            {
-                hmm_mat4 result = m4_1 + m4_2;
-                float Expected = 18.0f;
-                for (int Column = 0; Column < 4; ++Column)
-                {
-                    for (int Row = 0; Row < 4; ++Row)
-                    {
-                        EXPECT_FLOAT_EQ(result.Elements[Column][Row], Expected);
-                        Expected += 2.0f;
-                    }
-                }
-            }
-
-            m4_1 += m4_2;
-            float Expected = 18.0f;
-            for (int Column = 0; Column < 4; ++Column)
-            {
-                for (int Row = 0; Row < 4; ++Row)
-                {
-                    EXPECT_FLOAT_EQ(m4_1.Elements[Column][Row], Expected);
-                    Expected += 2.0f;
-                }
-            }
-#endif
-        }
-        TEST_END()
-
-        TEST_BEGIN(Quaternion)
-        {
-            hmm_quaternion q1 = HMM_Quaternion(1.0f, 2.0f, 3.0f, 4.0f);
-            hmm_quaternion q2 = HMM_Quaternion(5.0f, 6.0f, 7.0f, 8.0f);
-
-            {
-                hmm_quaternion result = HMM_AddQuaternion(q1, q2);
-                EXPECT_FLOAT_EQ(result.X, 6.0f);
-                EXPECT_FLOAT_EQ(result.Y, 8.0f);
-                EXPECT_FLOAT_EQ(result.Z, 10.0f);
-                EXPECT_FLOAT_EQ(result.W, 12.0f);
-            }
-#ifdef __cplusplus
-            {
-                hmm_quaternion result = HMM_Add(q1, q2);
-                EXPECT_FLOAT_EQ(result.X, 6.0f);
-                EXPECT_FLOAT_EQ(result.Y, 8.0f);
-                EXPECT_FLOAT_EQ(result.Z, 10.0f);
-                EXPECT_FLOAT_EQ(result.W, 12.0f);
-            }
-            {
-                hmm_quaternion result = q1 + q2;
-                EXPECT_FLOAT_EQ(result.X, 6.0f);
-                EXPECT_FLOAT_EQ(result.Y, 8.0f);
-                EXPECT_FLOAT_EQ(result.Z, 10.0f);
-                EXPECT_FLOAT_EQ(result.W, 12.0f);
-            }
-
-            q1 += q2;
-            EXPECT_FLOAT_EQ(q1.X, 6.0f);
-            EXPECT_FLOAT_EQ(q1.Y, 8.0f);
-            EXPECT_FLOAT_EQ(q1.Z, 10.0f);
-            EXPECT_FLOAT_EQ(q1.W, 12.0f);
-#endif
-        }
-        TEST_END()
-    }
-    CATEGORY_END()
-
-    CATEGORY_BEGIN(Subtraction)
-    {
-        TEST_BEGIN(Vec2)
-        {
-            hmm_vec2 v2_1 = HMM_Vec2(1.0f, 2.0f);
-            hmm_vec2 v2_2 = HMM_Vec2(3.0f, 4.0f);
-
-            {
-                hmm_vec2 result = HMM_SubtractVec2(v2_1, v2_2);
-                EXPECT_FLOAT_EQ(result.X, -2.0f);
-                EXPECT_FLOAT_EQ(result.Y, -2.0f);
-            }
-#ifdef __cplusplus
-            {
-                hmm_vec2 result = HMM_Subtract(v2_1, v2_2);
-                EXPECT_FLOAT_EQ(result.X, -2.0f);
-                EXPECT_FLOAT_EQ(result.Y, -2.0f);
-            }
-            {
-                hmm_vec2 result = v2_1 - v2_2;
-                EXPECT_FLOAT_EQ(result.X, -2.0f);
-                EXPECT_FLOAT_EQ(result.Y, -2.0f);
-            }
-
-            v2_1 -= v2_2;
-            EXPECT_FLOAT_EQ(v2_1.X, -2.0f);
-            EXPECT_FLOAT_EQ(v2_1.Y, -2.0f);
-#endif
-        }
-        TEST_END()
-
-        TEST_BEGIN(Vec3)
-        {
-            hmm_vec3 v3_1 = HMM_Vec3(1.0f, 2.0f, 3.0f);
-            hmm_vec3 v3_2 = HMM_Vec3(4.0f, 5.0f, 6.0f);
-
-            {
-                hmm_vec3 result = HMM_SubtractVec3(v3_1, v3_2);
-                EXPECT_FLOAT_EQ(result.X, -3.0f);
-                EXPECT_FLOAT_EQ(result.Y, -3.0f);
-                EXPECT_FLOAT_EQ(result.Z, -3.0f);
-            }
-#ifdef __cplusplus
-            {
-                hmm_vec3 result = HMM_Subtract(v3_1, v3_2);
-                EXPECT_FLOAT_EQ(result.X, -3.0f);
-                EXPECT_FLOAT_EQ(result.Y, -3.0f);
-                EXPECT_FLOAT_EQ(result.Z, -3.0f);
-            }
-            {
-                hmm_vec3 result = v3_1 - v3_2;
-                EXPECT_FLOAT_EQ(result.X, -3.0f);
-                EXPECT_FLOAT_EQ(result.Y, -3.0f);
-                EXPECT_FLOAT_EQ(result.Z, -3.0f);
-            }
-
-            v3_1 -= v3_2;
-            EXPECT_FLOAT_EQ(v3_1.X, -3.0f);
-            EXPECT_FLOAT_EQ(v3_1.Y, -3.0f);
-            EXPECT_FLOAT_EQ(v3_1.Z, -3.0f);
-#endif
-        }
-        TEST_END()
-
-        TEST_BEGIN(Vec4)
-        {
-            hmm_vec4 v4_1 = HMM_Vec4(1.0f, 2.0f, 3.0f, 4.0f);
-            hmm_vec4 v4_2 = HMM_Vec4(5.0f, 6.0f, 7.0f, 8.0f);
-
-            {
-                hmm_vec4 result = HMM_SubtractVec4(v4_1, v4_2);
-                EXPECT_FLOAT_EQ(result.X, -4.0f);
-                EXPECT_FLOAT_EQ(result.Y, -4.0f);
-                EXPECT_FLOAT_EQ(result.Z, -4.0f);
-                EXPECT_FLOAT_EQ(result.W, -4.0f);
-            }
-#ifdef __cplusplus
-            {
-                hmm_vec4 result = HMM_Subtract(v4_1, v4_2);
-                EXPECT_FLOAT_EQ(result.X, -4.0f);
-                EXPECT_FLOAT_EQ(result.Y, -4.0f);
-                EXPECT_FLOAT_EQ(result.Z, -4.0f);
-                EXPECT_FLOAT_EQ(result.W, -4.0f);
-            }
-            {
-                hmm_vec4 result = v4_1 - v4_2;
-                EXPECT_FLOAT_EQ(result.X, -4.0f);
-                EXPECT_FLOAT_EQ(result.Y, -4.0f);
-                EXPECT_FLOAT_EQ(result.Z, -4.0f);
-                EXPECT_FLOAT_EQ(result.W, -4.0f);
-            }
-
-            v4_1 -= v4_2;
-            EXPECT_FLOAT_EQ(v4_1.X, -4.0f);
-            EXPECT_FLOAT_EQ(v4_1.Y, -4.0f);
-            EXPECT_FLOAT_EQ(v4_1.Z, -4.0f);
-            EXPECT_FLOAT_EQ(v4_1.W, -4.0f);
-#endif
-        }
-        TEST_END()
-
-        TEST_BEGIN(Mat4)
-        {
-            hmm_mat4 m4_1 = HMM_Mat4(); // will have 1 - 16
-            hmm_mat4 m4_2 = HMM_Mat4(); // will have 17 - 32
-
-            // Fill the matrices
-            int Counter = 1;
-            for (int Column = 0; Column < 4; ++Column)
-            {
-                for (int Row = 0; Row < 4; ++Row)
-                {
-                    m4_1.Elements[Column][Row] = Counter;
-                    ++Counter;
-                }
-            }
-            for (int Column = 0; Column < 4; ++Column)
-            {
-                for (int Row = 0; Row < 4; ++Row)
-                {
-                    m4_2.Elements[Column][Row] = Counter;
-                    ++Counter;
-                }
-            }
-
-            // Test the results
-            {
-                hmm_mat4 result = HMM_SubtractMat4(m4_1, m4_2);
-                for (int Column = 0; Column < 4; ++Column)
-                {
-                    for (int Row = 0; Row < 4; ++Row)
-                    {
-                        EXPECT_FLOAT_EQ(result.Elements[Column][Row], -16.0f);
-                    }
-                }
-            }
-#ifdef __cplusplus
-            {
-                hmm_mat4 result = HMM_Subtract(m4_1, m4_2);
-                for (int Column = 0; Column < 4; ++Column)
-                {
-                    for (int Row = 0; Row < 4; ++Row)
-                    {
-                        EXPECT_FLOAT_EQ(result.Elements[Column][Row], -16.0f);
-                    }
-                }
-            }
-            {
-                hmm_mat4 result = m4_1 - m4_2;
-                for (int Column = 0; Column < 4; ++Column)
-                {
-                    for (int Row = 0; Row < 4; ++Row)
-                    {
-                        EXPECT_FLOAT_EQ(result.Elements[Column][Row], -16.0f);
-                    }
-                }
-            }
-
-            m4_1 -= m4_2;
-            for (int Column = 0; Column < 4; ++Column)
-            {
-                for (int Row = 0; Row < 4; ++Row)
-                {
-                    EXPECT_FLOAT_EQ(m4_1.Elements[Column][Row], -16.0f);
-                }
-            }
-#endif
-        }
-        TEST_END()
-
-        TEST_BEGIN(Quaternion)
-        {
-            hmm_quaternion q1 = HMM_Quaternion(1.0f, 2.0f, 3.0f, 4.0f);
-            hmm_quaternion q2 = HMM_Quaternion(5.0f, 6.0f, 7.0f, 8.0f);
-
-            {
-                hmm_quaternion result = HMM_SubtractQuaternion(q1, q2);
-                EXPECT_FLOAT_EQ(result.X, -4.0f);
-                EXPECT_FLOAT_EQ(result.Y, -4.0f);
-                EXPECT_FLOAT_EQ(result.Z, -4.0f);
-                EXPECT_FLOAT_EQ(result.W, -4.0f);
-            }
-#ifdef __cplusplus
-            {
-                hmm_quaternion result = HMM_Subtract(q1, q2);
-                EXPECT_FLOAT_EQ(result.X, -4.0f);
-                EXPECT_FLOAT_EQ(result.Y, -4.0f);
-                EXPECT_FLOAT_EQ(result.Z, -4.0f);
-                EXPECT_FLOAT_EQ(result.W, -4.0f);
-            }
-            {
-                hmm_quaternion result = q1 - q2;
-                EXPECT_FLOAT_EQ(result.X, -4.0f);
-                EXPECT_FLOAT_EQ(result.Y, -4.0f);
-                EXPECT_FLOAT_EQ(result.Z, -4.0f);
-                EXPECT_FLOAT_EQ(result.W, -4.0f);
-            }
-
-            q1 -= q2;
-            EXPECT_FLOAT_EQ(q1.X, -4.0f);
-            EXPECT_FLOAT_EQ(q1.Y, -4.0f);
-            EXPECT_FLOAT_EQ(q1.Z, -4.0f);
-            EXPECT_FLOAT_EQ(q1.W, -4.0f);
-#endif
-        }
-        TEST_END()
-    }
-    CATEGORY_END()
-
-    CATEGORY_BEGIN(Multiplication)
-    {
-        TEST_BEGIN(Vec2Vec2)
-        {
-            hmm_vec2 v2_1 = HMM_Vec2(1.0f, 2.0f);
-            hmm_vec2 v2_2 = HMM_Vec2(3.0f, 4.0f);
-
-            {
-                hmm_vec2 result = HMM_MultiplyVec2(v2_1, v2_2);
-                EXPECT_FLOAT_EQ(result.X, 3.0f);
-                EXPECT_FLOAT_EQ(result.Y, 8.0f);
-            }
-#ifdef __cplusplus
-            {
-                hmm_vec2 result = HMM_Multiply(v2_1, v2_2);
-                EXPECT_FLOAT_EQ(result.X, 3.0f);
-                EXPECT_FLOAT_EQ(result.Y, 8.0f);
-            }
-            {
-                hmm_vec2 result = v2_1 * v2_2;
-                EXPECT_FLOAT_EQ(result.X, 3.0f);
-                EXPECT_FLOAT_EQ(result.Y, 8.0f);
-            }
-
-            v2_1 *= v2_2;
-            EXPECT_FLOAT_EQ(v2_1.X, 3.0f);
-            EXPECT_FLOAT_EQ(v2_1.Y, 8.0f);
-#endif
-        }
-        TEST_END()
-
-        TEST_BEGIN(Vec2Scalar)
-        {
-            hmm_vec2 v2 = HMM_Vec2(1.0f, 2.0f);
-            float s = 3.0f;
-
-            {
-                hmm_vec2 result = HMM_MultiplyVec2f(v2, s);
-                EXPECT_FLOAT_EQ(result.X, 3.0f);
-                EXPECT_FLOAT_EQ(result.Y, 6.0f);
-            }
-#ifdef __cplusplus
-            {
-                hmm_vec2 result = HMM_Multiply(v2, s);
-                EXPECT_FLOAT_EQ(result.X, 3.0f);
-                EXPECT_FLOAT_EQ(result.Y, 6.0f);
-            }
-            {
-                hmm_vec2 result = v2 * s;
-                EXPECT_FLOAT_EQ(result.X, 3.0f);
-                EXPECT_FLOAT_EQ(result.Y, 6.0f);
-            }
-            {
-                hmm_vec2 result = s * v2;
-                EXPECT_FLOAT_EQ(result.X, 3.0f);
-                EXPECT_FLOAT_EQ(result.Y, 6.0f);
-            }
-
-            v2 *= s;
-            EXPECT_FLOAT_EQ(v2.X, 3.0f);
-            EXPECT_FLOAT_EQ(v2.Y, 6.0f);
-#endif
-        }
-        TEST_END()
-
-        TEST_BEGIN(Vec3Vec3)
-        {
-            hmm_vec3 v3_1 = HMM_Vec3(1.0f, 2.0f, 3.0f);
-            hmm_vec3 v3_2 = HMM_Vec3(4.0f, 5.0f, 6.0f);
-
-            {
-                hmm_vec3 result = HMM_MultiplyVec3(v3_1, v3_2);
-                EXPECT_FLOAT_EQ(result.X, 4.0f);
-                EXPECT_FLOAT_EQ(result.Y, 10.0f);
-                EXPECT_FLOAT_EQ(result.Z, 18.0f);
-            }
-#ifdef __cplusplus
-            {
-                hmm_vec3 result = HMM_Multiply(v3_1, v3_2);
-                EXPECT_FLOAT_EQ(result.X, 4.0f);
-                EXPECT_FLOAT_EQ(result.Y, 10.0f);
-                EXPECT_FLOAT_EQ(result.Z, 18.0f);
-            }
-            {
-                hmm_vec3 result = v3_1 * v3_2;
-                EXPECT_FLOAT_EQ(result.X, 4.0f);
-                EXPECT_FLOAT_EQ(result.Y, 10.0f);
-                EXPECT_FLOAT_EQ(result.Z, 18.0f);
-            }
-
-            v3_1 *= v3_2;
-            EXPECT_FLOAT_EQ(v3_1.X, 4.0f);
-            EXPECT_FLOAT_EQ(v3_1.Y, 10.0f);
-            EXPECT_FLOAT_EQ(v3_1.Z, 18.0f);
-#endif
-        }
-        TEST_END()
-
-        TEST_BEGIN(Vec3Scalar)
-        {
-            hmm_vec3 v3 = HMM_Vec3(1.0f, 2.0f, 3.0f);
-            float s = 3.0f;
-
-            {
-                hmm_vec3 result = HMM_MultiplyVec3f(v3, s);
-                EXPECT_FLOAT_EQ(result.X, 3.0f);
-                EXPECT_FLOAT_EQ(result.Y, 6.0f);
-                EXPECT_FLOAT_EQ(result.Z, 9.0f);
-            }
-#ifdef __cplusplus
-            {
-                hmm_vec3 result = HMM_Multiply(v3, s);
-                EXPECT_FLOAT_EQ(result.X, 3.0f);
-                EXPECT_FLOAT_EQ(result.Y, 6.0f);
-                EXPECT_FLOAT_EQ(result.Z, 9.0f);
-            }
-            {
-                hmm_vec3 result = v3 * s;
-                EXPECT_FLOAT_EQ(result.X, 3.0f);
-                EXPECT_FLOAT_EQ(result.Y, 6.0f);
-                EXPECT_FLOAT_EQ(result.Z, 9.0f);
-            }
-            {
-                hmm_vec3 result = s * v3;
-                EXPECT_FLOAT_EQ(result.X, 3.0f);
-                EXPECT_FLOAT_EQ(result.Y, 6.0f);
-                EXPECT_FLOAT_EQ(result.Z, 9.0f);
-            }
-
-            v3 *= s;
-            EXPECT_FLOAT_EQ(v3.X, 3.0f);
-            EXPECT_FLOAT_EQ(v3.Y, 6.0f);
-            EXPECT_FLOAT_EQ(v3.Z, 9.0f);
-#endif
-        }
-        TEST_END()
-
-        TEST_BEGIN(Vec4Vec4)
-        {
-            hmm_vec4 v4_1 = HMM_Vec4(1.0f, 2.0f, 3.0f, 4.0f);
-            hmm_vec4 v4_2 = HMM_Vec4(5.0f, 6.0f, 7.0f, 8.0f);
-
-            {
-                hmm_vec4 result = HMM_MultiplyVec4(v4_1, v4_2);
-                EXPECT_FLOAT_EQ(result.X, 5.0f);
-                EXPECT_FLOAT_EQ(result.Y, 12.0f);
-                EXPECT_FLOAT_EQ(result.Z, 21.0f);
-                EXPECT_FLOAT_EQ(result.W, 32.0f);
-            }
-#ifdef __cplusplus
-            {
-                hmm_vec4 result = HMM_Multiply(v4_1, v4_2);
-                EXPECT_FLOAT_EQ(result.X, 5.0f);
-                EXPECT_FLOAT_EQ(result.Y, 12.0f);
-                EXPECT_FLOAT_EQ(result.Z, 21.0f);
-                EXPECT_FLOAT_EQ(result.W, 32.0f);
-            }
-            {
-                hmm_vec4 result = v4_1 * v4_2;
-                EXPECT_FLOAT_EQ(result.X, 5.0f);
-                EXPECT_FLOAT_EQ(result.Y, 12.0f);
-                EXPECT_FLOAT_EQ(result.Z, 21.0f);
-                EXPECT_FLOAT_EQ(result.W, 32.0f);
-            }
-
-            v4_1 *= v4_2;
-            EXPECT_FLOAT_EQ(v4_1.X, 5.0f);
-            EXPECT_FLOAT_EQ(v4_1.Y, 12.0f);
-            EXPECT_FLOAT_EQ(v4_1.Z, 21.0f);
-            EXPECT_FLOAT_EQ(v4_1.W, 32.0f);
-#endif
-        }
-        TEST_END()
-
-        TEST_BEGIN(Vec4Scalar)
-        {
-            hmm_vec4 v4 = HMM_Vec4(1.0f, 2.0f, 3.0f, 4.0f);
-            float s = 3.0f;
-
-            {
-                hmm_vec4 result = HMM_MultiplyVec4f(v4, s);
-                EXPECT_FLOAT_EQ(result.X, 3.0f);
-                EXPECT_FLOAT_EQ(result.Y, 6.0f);
-                EXPECT_FLOAT_EQ(result.Z, 9.0f);
-                EXPECT_FLOAT_EQ(result.W, 12.0f);
-            }
-#ifdef __cplusplus
-            {
-                hmm_vec4 result = HMM_Multiply(v4, s);
-                EXPECT_FLOAT_EQ(result.X, 3.0f);
-                EXPECT_FLOAT_EQ(result.Y, 6.0f);
-                EXPECT_FLOAT_EQ(result.Z, 9.0f);
-                EXPECT_FLOAT_EQ(result.W, 12.0f);
-            }
-            {
-                hmm_vec4 result = v4 * s;
-                EXPECT_FLOAT_EQ(result.X, 3.0f);
-                EXPECT_FLOAT_EQ(result.Y, 6.0f);
-                EXPECT_FLOAT_EQ(result.Z, 9.0f);
-                EXPECT_FLOAT_EQ(result.W, 12.0f);
-            }
-            {
-                hmm_vec4 result = s * v4;
-                EXPECT_FLOAT_EQ(result.X, 3.0f);
-                EXPECT_FLOAT_EQ(result.Y, 6.0f);
-                EXPECT_FLOAT_EQ(result.Z, 9.0f);
-                EXPECT_FLOAT_EQ(result.W, 12.0f);
-            }
-
-            v4 *= s;
-            EXPECT_FLOAT_EQ(v4.X, 3.0f);
-            EXPECT_FLOAT_EQ(v4.Y, 6.0f);
-            EXPECT_FLOAT_EQ(v4.Z, 9.0f);
-#endif
-        }
-        TEST_END()
-
-        TEST_BEGIN(Mat4Mat4)
-        {
-            hmm_mat4 m4_1 = HMM_Mat4(); // will have 1 - 16
-            hmm_mat4 m4_2 = HMM_Mat4(); // will have 17 - 32
-
-            // Fill the matrices
-            int Counter = 1;
-            for (int Column = 0; Column < 4; ++Column)
-            {
-                for (int Row = 0; Row < 4; ++Row)
-                {
-                    m4_1.Elements[Column][Row] = Counter;
-                    ++Counter;
-                }
-            }
-            for (int Column = 0; Column < 4; ++Column)
-            {
-                for (int Row = 0; Row < 4; ++Row)
-                {
-                    m4_2.Elements[Column][Row] = Counter;
-                    ++Counter;
-                }
-            }
-
-            // Test the results
-            {
-                hmm_mat4 result = HMM_MultiplyMat4(m4_1, m4_2);
-                EXPECT_FLOAT_EQ(result.Elements[0][0], 538.0f);
-                EXPECT_FLOAT_EQ(result.Elements[0][1], 612.0f);
-                EXPECT_FLOAT_EQ(result.Elements[0][2], 686.0f);
-                EXPECT_FLOAT_EQ(result.Elements[0][3], 760.0f);
-                EXPECT_FLOAT_EQ(result.Elements[1][0], 650.0f);
-                EXPECT_FLOAT_EQ(result.Elements[1][1], 740.0f);
-                EXPECT_FLOAT_EQ(result.Elements[1][2], 830.0f);
-                EXPECT_FLOAT_EQ(result.Elements[1][3], 920.0f);
-                EXPECT_FLOAT_EQ(result.Elements[2][0], 762.0f);
-                EXPECT_FLOAT_EQ(result.Elements[2][1], 868.0f);
-                EXPECT_FLOAT_EQ(result.Elements[2][2], 974.0f);
-                EXPECT_FLOAT_EQ(result.Elements[2][3], 1080.0f);
-                EXPECT_FLOAT_EQ(result.Elements[3][0], 874.0f);
-                EXPECT_FLOAT_EQ(result.Elements[3][1], 996.0f);
-                EXPECT_FLOAT_EQ(result.Elements[3][2], 1118.0f);
-                EXPECT_FLOAT_EQ(result.Elements[3][3], 1240.0f);
-            }
-#ifdef __cplusplus
-            {
-                hmm_mat4 result = HMM_Multiply(m4_1, m4_2);
-                EXPECT_FLOAT_EQ(result.Elements[0][0], 538.0f);
-                EXPECT_FLOAT_EQ(result.Elements[0][1], 612.0f);
-                EXPECT_FLOAT_EQ(result.Elements[0][2], 686.0f);
-                EXPECT_FLOAT_EQ(result.Elements[0][3], 760.0f);
-                EXPECT_FLOAT_EQ(result.Elements[1][0], 650.0f);
-                EXPECT_FLOAT_EQ(result.Elements[1][1], 740.0f);
-                EXPECT_FLOAT_EQ(result.Elements[1][2], 830.0f);
-                EXPECT_FLOAT_EQ(result.Elements[1][3], 920.0f);
-                EXPECT_FLOAT_EQ(result.Elements[2][0], 762.0f);
-                EXPECT_FLOAT_EQ(result.Elements[2][1], 868.0f);
-                EXPECT_FLOAT_EQ(result.Elements[2][2], 974.0f);
-                EXPECT_FLOAT_EQ(result.Elements[2][3], 1080.0f);
-                EXPECT_FLOAT_EQ(result.Elements[3][0], 874.0f);
-                EXPECT_FLOAT_EQ(result.Elements[3][1], 996.0f);
-                EXPECT_FLOAT_EQ(result.Elements[3][2], 1118.0f);
-                EXPECT_FLOAT_EQ(result.Elements[3][3], 1240.0f);
-            }
-            {
-                hmm_mat4 result = m4_1 * m4_2;
-                EXPECT_FLOAT_EQ(result.Elements[0][0], 538.0f);
-                EXPECT_FLOAT_EQ(result.Elements[0][1], 612.0f);
-                EXPECT_FLOAT_EQ(result.Elements[0][2], 686.0f);
-                EXPECT_FLOAT_EQ(result.Elements[0][3], 760.0f);
-                EXPECT_FLOAT_EQ(result.Elements[1][0], 650.0f);
-                EXPECT_FLOAT_EQ(result.Elements[1][1], 740.0f);
-                EXPECT_FLOAT_EQ(result.Elements[1][2], 830.0f);
-                EXPECT_FLOAT_EQ(result.Elements[1][3], 920.0f);
-                EXPECT_FLOAT_EQ(result.Elements[2][0], 762.0f);
-                EXPECT_FLOAT_EQ(result.Elements[2][1], 868.0f);
-                EXPECT_FLOAT_EQ(result.Elements[2][2], 974.0f);
-                EXPECT_FLOAT_EQ(result.Elements[2][3], 1080.0f);
-                EXPECT_FLOAT_EQ(result.Elements[3][0], 874.0f);
-                EXPECT_FLOAT_EQ(result.Elements[3][1], 996.0f);
-                EXPECT_FLOAT_EQ(result.Elements[3][2], 1118.0f);
-                EXPECT_FLOAT_EQ(result.Elements[3][3], 1240.0f);
-            }
-
-            // At the time I wrote this, I intentionally omitted
-            // the *= operator for matrices because matrix
-            // multiplication is not commutative. (bvisness)
-#endif
-        }
-        TEST_END()
-
-        TEST_BEGIN(Mat4Scalar)
-        {
-            hmm_mat4 m4 = HMM_Mat4(); // will have 1 - 16
-            float s = 3;
-
-            // Fill the matrix
-            int Counter = 1;
-            for (int Column = 0; Column < 4; ++Column)
-            {
-                for (int Row = 0; Row < 4; ++Row)
-                {
-                    m4.Elements[Column][Row] = Counter;
-                    ++Counter;
-                }
-            }
-
-            // Test the results
-            {
-                hmm_mat4 result = HMM_MultiplyMat4f(m4, s);
-                EXPECT_FLOAT_EQ(result.Elements[0][0], 3.0f);
-                EXPECT_FLOAT_EQ(result.Elements[0][1], 6.0f);
-                EXPECT_FLOAT_EQ(result.Elements[0][2], 9.0f);
-                EXPECT_FLOAT_EQ(result.Elements[0][3], 12.0f);
-                EXPECT_FLOAT_EQ(result.Elements[1][0], 15.0f);
-                EXPECT_FLOAT_EQ(result.Elements[1][1], 18.0f);
-                EXPECT_FLOAT_EQ(result.Elements[1][2], 21.0f);
-                EXPECT_FLOAT_EQ(result.Elements[1][3], 24.0f);
-                EXPECT_FLOAT_EQ(result.Elements[2][0], 27.0f);
-                EXPECT_FLOAT_EQ(result.Elements[2][1], 30.0f);
-                EXPECT_FLOAT_EQ(result.Elements[2][2], 33.0f);
-                EXPECT_FLOAT_EQ(result.Elements[2][3], 36.0f);
-                EXPECT_FLOAT_EQ(result.Elements[3][0], 39.0f);
-                EXPECT_FLOAT_EQ(result.Elements[3][1], 42.0f);
-                EXPECT_FLOAT_EQ(result.Elements[3][2], 45.0f);
-                EXPECT_FLOAT_EQ(result.Elements[3][3], 48.0f);
-            }
-#ifdef __cplusplus
-            {
-                hmm_mat4 result = HMM_Multiply(m4, s);
-                EXPECT_FLOAT_EQ(result.Elements[0][0], 3.0f);
-                EXPECT_FLOAT_EQ(result.Elements[0][1], 6.0f);
-                EXPECT_FLOAT_EQ(result.Elements[0][2], 9.0f);
-                EXPECT_FLOAT_EQ(result.Elements[0][3], 12.0f);
-                EXPECT_FLOAT_EQ(result.Elements[1][0], 15.0f);
-                EXPECT_FLOAT_EQ(result.Elements[1][1], 18.0f);
-                EXPECT_FLOAT_EQ(result.Elements[1][2], 21.0f);
-                EXPECT_FLOAT_EQ(result.Elements[1][3], 24.0f);
-                EXPECT_FLOAT_EQ(result.Elements[2][0], 27.0f);
-                EXPECT_FLOAT_EQ(result.Elements[2][1], 30.0f);
-                EXPECT_FLOAT_EQ(result.Elements[2][2], 33.0f);
-                EXPECT_FLOAT_EQ(result.Elements[2][3], 36.0f);
-                EXPECT_FLOAT_EQ(result.Elements[3][0], 39.0f);
-                EXPECT_FLOAT_EQ(result.Elements[3][1], 42.0f);
-                EXPECT_FLOAT_EQ(result.Elements[3][2], 45.0f);
-                EXPECT_FLOAT_EQ(result.Elements[3][3], 48.0f);
-            }
-            {
-                hmm_mat4 result = m4 * s;
-                EXPECT_FLOAT_EQ(result.Elements[0][0], 3.0f);
-                EXPECT_FLOAT_EQ(result.Elements[0][1], 6.0f);
-                EXPECT_FLOAT_EQ(result.Elements[0][2], 9.0f);
-                EXPECT_FLOAT_EQ(result.Elements[0][3], 12.0f);
-                EXPECT_FLOAT_EQ(result.Elements[1][0], 15.0f);
-                EXPECT_FLOAT_EQ(result.Elements[1][1], 18.0f);
-                EXPECT_FLOAT_EQ(result.Elements[1][2], 21.0f);
-                EXPECT_FLOAT_EQ(result.Elements[1][3], 24.0f);
-                EXPECT_FLOAT_EQ(result.Elements[2][0], 27.0f);
-                EXPECT_FLOAT_EQ(result.Elements[2][1], 30.0f);
-                EXPECT_FLOAT_EQ(result.Elements[2][2], 33.0f);
-                EXPECT_FLOAT_EQ(result.Elements[2][3], 36.0f);
-                EXPECT_FLOAT_EQ(result.Elements[3][0], 39.0f);
-                EXPECT_FLOAT_EQ(result.Elements[3][1], 42.0f);
-                EXPECT_FLOAT_EQ(result.Elements[3][2], 45.0f);
-                EXPECT_FLOAT_EQ(result.Elements[3][3], 48.0f);
-            }
-            {
-                hmm_mat4 result = s * m4;
-                EXPECT_FLOAT_EQ(result.Elements[0][0], 3.0f);
-                EXPECT_FLOAT_EQ(result.Elements[0][1], 6.0f);
-                EXPECT_FLOAT_EQ(result.Elements[0][2], 9.0f);
-                EXPECT_FLOAT_EQ(result.Elements[0][3], 12.0f);
-                EXPECT_FLOAT_EQ(result.Elements[1][0], 15.0f);
-                EXPECT_FLOAT_EQ(result.Elements[1][1], 18.0f);
-                EXPECT_FLOAT_EQ(result.Elements[1][2], 21.0f);
-                EXPECT_FLOAT_EQ(result.Elements[1][3], 24.0f);
-                EXPECT_FLOAT_EQ(result.Elements[2][0], 27.0f);
-                EXPECT_FLOAT_EQ(result.Elements[2][1], 30.0f);
-                EXPECT_FLOAT_EQ(result.Elements[2][2], 33.0f);
-                EXPECT_FLOAT_EQ(result.Elements[2][3], 36.0f);
-                EXPECT_FLOAT_EQ(result.Elements[3][0], 39.0f);
-                EXPECT_FLOAT_EQ(result.Elements[3][1], 42.0f);
-                EXPECT_FLOAT_EQ(result.Elements[3][2], 45.0f);
-                EXPECT_FLOAT_EQ(result.Elements[3][3], 48.0f);
-            }
-
-            m4 *= s;
-            EXPECT_FLOAT_EQ(m4.Elements[0][0], 3.0f);
-            EXPECT_FLOAT_EQ(m4.Elements[0][1], 6.0f);
-            EXPECT_FLOAT_EQ(m4.Elements[0][2], 9.0f);
-            EXPECT_FLOAT_EQ(m4.Elements[0][3], 12.0f);
-            EXPECT_FLOAT_EQ(m4.Elements[1][0], 15.0f);
-            EXPECT_FLOAT_EQ(m4.Elements[1][1], 18.0f);
-            EXPECT_FLOAT_EQ(m4.Elements[1][2], 21.0f);
-            EXPECT_FLOAT_EQ(m4.Elements[1][3], 24.0f);
-            EXPECT_FLOAT_EQ(m4.Elements[2][0], 27.0f);
-            EXPECT_FLOAT_EQ(m4.Elements[2][1], 30.0f);
-            EXPECT_FLOAT_EQ(m4.Elements[2][2], 33.0f);
-            EXPECT_FLOAT_EQ(m4.Elements[2][3], 36.0f);
-            EXPECT_FLOAT_EQ(m4.Elements[3][0], 39.0f);
-            EXPECT_FLOAT_EQ(m4.Elements[3][1], 42.0f);
-            EXPECT_FLOAT_EQ(m4.Elements[3][2], 45.0f);
-            EXPECT_FLOAT_EQ(m4.Elements[3][3], 48.0f);
-#endif
-        }
-        TEST_END()
-
-        TEST_BEGIN(Mat4Vec4)
-        {
-            hmm_mat4 m4 = HMM_Mat4(); // will have 1 - 16
-            hmm_vec4 v4 = HMM_Vec4(1.0f, 2.0f, 3.0f, 4.0f);
-
-            // Fill the matrix
-            int Counter = 1;
-            for (int Column = 0; Column < 4; ++Column)
-            {
-                for (int Row = 0; Row < 4; ++Row)
-                {
-                    m4.Elements[Column][Row] = Counter;
-                    ++Counter;
-                }
-            }
-
-            // Test the results
-            {
-                hmm_vec4 result = HMM_MultiplyMat4ByVec4(m4, v4);
-                EXPECT_FLOAT_EQ(result.X, 90.0f);
-                EXPECT_FLOAT_EQ(result.Y, 100.0f);
-                EXPECT_FLOAT_EQ(result.Z, 110.0f);
-                EXPECT_FLOAT_EQ(result.W, 120.0f);
-            }
-#ifdef __cplusplus
-            {
-                hmm_vec4 result = HMM_Multiply(m4, v4);
-                EXPECT_FLOAT_EQ(result.X, 90.0f);
-                EXPECT_FLOAT_EQ(result.Y, 100.0f);
-                EXPECT_FLOAT_EQ(result.Z, 110.0f);
-                EXPECT_FLOAT_EQ(result.W, 120.0f);
-            }
-            {
-                hmm_vec4 result = m4 * v4;
-                EXPECT_FLOAT_EQ(result.X, 90.0f);
-                EXPECT_FLOAT_EQ(result.Y, 100.0f);
-                EXPECT_FLOAT_EQ(result.Z, 110.0f);
-                EXPECT_FLOAT_EQ(result.W, 120.0f);
-            }
-
-            // *= makes no sense for this particular case.
-#endif
-        }
-        TEST_END()
-
-        TEST_BEGIN(QuaternionQuaternion)
-        {
-            hmm_quaternion q1 = HMM_Quaternion(1.0f, 2.0f, 3.0f, 4.0f);
-            hmm_quaternion q2 = HMM_Quaternion(5.0f, 6.0f, 7.0f, 8.0f);
-
-            {
-                hmm_quaternion result = HMM_MultiplyQuaternion(q1, q2);
-                EXPECT_FLOAT_EQ(result.X, 24.0f);
-                EXPECT_FLOAT_EQ(result.Y, 48.0f);
-                EXPECT_FLOAT_EQ(result.Z, 48.0f);
-                EXPECT_FLOAT_EQ(result.W, -6.0f);
-            }
-#ifdef __cplusplus
-            {
-                hmm_quaternion result = HMM_Multiply(q1, q2);
-                EXPECT_FLOAT_EQ(result.X, 24.0f);
-                EXPECT_FLOAT_EQ(result.Y, 48.0f);
-                EXPECT_FLOAT_EQ(result.Z, 48.0f);
-                EXPECT_FLOAT_EQ(result.W, -6.0f);
-            }
-            {
-                hmm_quaternion result = q1 * q2;
-                EXPECT_FLOAT_EQ(result.X, 24.0f);
-                EXPECT_FLOAT_EQ(result.Y, 48.0f);
-                EXPECT_FLOAT_EQ(result.Z, 48.0f);
-                EXPECT_FLOAT_EQ(result.W, -6.0f);
-            }
-
-            // Like with matrices, we're not implementing the *=
-            // operator for quaternions because quaternion multiplication
-            // is not commutative.
-#endif
-        }
-        TEST_END()
-
-        TEST_BEGIN(QuaternionScalar)
-        {
-            hmm_quaternion q = HMM_Quaternion(1.0f, 2.0f, 3.0f, 4.0f);
-            float f = 2.0f;
-
-            {
-                hmm_quaternion result = HMM_MultiplyQuaternionF(q, f);
-                EXPECT_FLOAT_EQ(result.X, 2.0f);
-                EXPECT_FLOAT_EQ(result.Y, 4.0f);
-                EXPECT_FLOAT_EQ(result.Z, 6.0f);
-                EXPECT_FLOAT_EQ(result.W, 8.0f);
-            }
-#ifdef __cplusplus
-            {
-                hmm_quaternion result = HMM_Multiply(q, f);
-                EXPECT_FLOAT_EQ(result.X, 2.0f);
-                EXPECT_FLOAT_EQ(result.Y, 4.0f);
-                EXPECT_FLOAT_EQ(result.Z, 6.0f);
-                EXPECT_FLOAT_EQ(result.W, 8.0f);
-            }
-            {
-                hmm_quaternion result = q * f;
-                EXPECT_FLOAT_EQ(result.X, 2.0f);
-                EXPECT_FLOAT_EQ(result.Y, 4.0f);
-                EXPECT_FLOAT_EQ(result.Z, 6.0f);
-                EXPECT_FLOAT_EQ(result.W, 8.0f);
-            }
-            {
-                hmm_quaternion result = f * q;
-                EXPECT_FLOAT_EQ(result.X, 2.0f);
-                EXPECT_FLOAT_EQ(result.Y, 4.0f);
-                EXPECT_FLOAT_EQ(result.Z, 6.0f);
-                EXPECT_FLOAT_EQ(result.W, 8.0f);
-            }
-
-            q *= f;
-            EXPECT_FLOAT_EQ(q.X, 2.0f);
-            EXPECT_FLOAT_EQ(q.Y, 4.0f);
-            EXPECT_FLOAT_EQ(q.Z, 6.0f);
-            EXPECT_FLOAT_EQ(q.W, 8.0f);
-#endif
-        }
-        TEST_END()
-    }
-    CATEGORY_END()
-
-    CATEGORY_BEGIN(Division)
-    {
-        TEST_BEGIN(Vec2Vec2)
-        {
-            hmm_vec2 v2_1 = HMM_Vec2(1.0f, 3.0f);
-            hmm_vec2 v2_2 = HMM_Vec2(2.0f, 4.0f);
-
-            {
-                hmm_vec2 result = HMM_DivideVec2(v2_1, v2_2);
-                EXPECT_FLOAT_EQ(result.X, 0.5f);
-                EXPECT_FLOAT_EQ(result.Y, 0.75f);
-            }
-#ifdef __cplusplus
-            {
-                hmm_vec2 result = HMM_Divide(v2_1, v2_2);
-                EXPECT_FLOAT_EQ(result.X, 0.5f);
-                EXPECT_FLOAT_EQ(result.Y, 0.75f);
-            }
-            {
-                hmm_vec2 result = v2_1 / v2_2;
-                EXPECT_FLOAT_EQ(result.X, 0.5f);
-                EXPECT_FLOAT_EQ(result.Y, 0.75f);
-            }
-
-            v2_1 /= v2_2;
-            EXPECT_FLOAT_EQ(v2_1.X, 0.5f);
-            EXPECT_FLOAT_EQ(v2_1.Y, 0.75f);
-#endif
-        }
-        TEST_END()
-
-        TEST_BEGIN(Vec2Scalar)
-        {
-            hmm_vec2 v2 = HMM_Vec2(1.0f, 2.0f);
-            float s = 2;
-
-            {
-                hmm_vec2 result = HMM_DivideVec2f(v2, s);
-                EXPECT_FLOAT_EQ(result.X, 0.5f);
-                EXPECT_FLOAT_EQ(result.Y, 1.0f);
-            }
-#ifdef __cplusplus
-            {
-                hmm_vec2 result = HMM_Divide(v2, s);
-                EXPECT_FLOAT_EQ(result.X, 0.5f);
-                EXPECT_FLOAT_EQ(result.Y, 1.0f);
-            }
-            {
-                hmm_vec2 result = v2 / s;
-                EXPECT_FLOAT_EQ(result.X, 0.5f);
-                EXPECT_FLOAT_EQ(result.Y, 1.0f);
-            }
-
-            v2 /= s;
-            EXPECT_FLOAT_EQ(v2.X, 0.5f);
-            EXPECT_FLOAT_EQ(v2.Y, 1.0f);
-#endif
-        }
-        TEST_END()
-
-        TEST_BEGIN(Vec3Vec3)
-        {
-            hmm_vec3 v3_1 = HMM_Vec3(1.0f, 3.0f, 5.0f);
-            hmm_vec3 v3_2 = HMM_Vec3(2.0f, 4.0f, 0.5f);
-
-            {
-                hmm_vec3 result = HMM_DivideVec3(v3_1, v3_2);
-                EXPECT_FLOAT_EQ(result.X, 0.5f);
-                EXPECT_FLOAT_EQ(result.Y, 0.75f);
-                EXPECT_FLOAT_EQ(result.Z, 10.0f);
-            }
-#ifdef __cplusplus
-            {
-                hmm_vec3 result = HMM_Divide(v3_1, v3_2);
-                EXPECT_FLOAT_EQ(result.X, 0.5f);
-                EXPECT_FLOAT_EQ(result.Y, 0.75f);
-                EXPECT_FLOAT_EQ(result.Z, 10.0f);
-            }
-            {
-                hmm_vec3 result = v3_1 / v3_2;
-                EXPECT_FLOAT_EQ(result.X, 0.5f);
-                EXPECT_FLOAT_EQ(result.Y, 0.75f);
-                EXPECT_FLOAT_EQ(result.Z, 10.0f);
-            }
-
-            v3_1 /= v3_2;
-            EXPECT_FLOAT_EQ(v3_1.X, 0.5f);
-            EXPECT_FLOAT_EQ(v3_1.Y, 0.75f);
-            EXPECT_FLOAT_EQ(v3_1.Z, 10.0f);
-#endif
-        }
-        TEST_END()
-
-        TEST_BEGIN(Vec3Scalar)
-        {
-            hmm_vec3 v3 = HMM_Vec3(1.0f, 2.0f, 3.0f);
-            float s = 2;
-
-            {
-                hmm_vec3 result = HMM_DivideVec3f(v3, s);
-                EXPECT_FLOAT_EQ(result.X, 0.5f);
-                EXPECT_FLOAT_EQ(result.Y, 1.0f);
-                EXPECT_FLOAT_EQ(result.Z, 1.5f);
-            }
-#ifdef __cplusplus
-            {
-                hmm_vec3 result = HMM_Divide(v3, s);
-                EXPECT_FLOAT_EQ(result.X, 0.5f);
-                EXPECT_FLOAT_EQ(result.Y, 1.0f);
-                EXPECT_FLOAT_EQ(result.Z, 1.5f);
-            }
-            {
-                hmm_vec3 result = v3 / s;
-                EXPECT_FLOAT_EQ(result.X, 0.5f);
-                EXPECT_FLOAT_EQ(result.Y, 1.0f);
-                EXPECT_FLOAT_EQ(result.Z, 1.5f);
-            }
-
-            v3 /= s;
-            EXPECT_FLOAT_EQ(v3.X, 0.5f);
-            EXPECT_FLOAT_EQ(v3.Y, 1.0f);
-            EXPECT_FLOAT_EQ(v3.Z, 1.5f);
-#endif
-        }
-        TEST_END()
-
-        TEST_BEGIN(Vec4Vec4)
-        {
-            hmm_vec4 v4_1 = HMM_Vec4(1.0f, 3.0f, 5.0f, 1.0f);
-            hmm_vec4 v4_2 = HMM_Vec4(2.0f, 4.0f, 0.5f, 4.0f);
-
-            {
-                hmm_vec4 result = HMM_DivideVec4(v4_1, v4_2);
-                EXPECT_FLOAT_EQ(result.X, 0.5f);
-                EXPECT_FLOAT_EQ(result.Y, 0.75f);
-                EXPECT_FLOAT_EQ(result.Z, 10.0f);
-                EXPECT_FLOAT_EQ(result.W, 0.25f);
-            }
-#ifdef __cplusplus
-            {
-                hmm_vec4 result = HMM_Divide(v4_1, v4_2);
-                EXPECT_FLOAT_EQ(result.X, 0.5f);
-                EXPECT_FLOAT_EQ(result.Y, 0.75f);
-                EXPECT_FLOAT_EQ(result.Z, 10.0f);
-                EXPECT_FLOAT_EQ(result.W, 0.25f);
-            }
-            {
-                hmm_vec4 result = v4_1 / v4_2;
-                EXPECT_FLOAT_EQ(result.X, 0.5f);
-                EXPECT_FLOAT_EQ(result.Y, 0.75f);
-                EXPECT_FLOAT_EQ(result.Z, 10.0f);
-                EXPECT_FLOAT_EQ(result.W, 0.25f);
-            }
-
-            v4_1 /= v4_2;
-            EXPECT_FLOAT_EQ(v4_1.X, 0.5f);
-            EXPECT_FLOAT_EQ(v4_1.Y, 0.75f);
-            EXPECT_FLOAT_EQ(v4_1.Z, 10.0f);
-            EXPECT_FLOAT_EQ(v4_1.W, 0.25f);
-#endif
-        }
-        TEST_END()
-
-        TEST_BEGIN(Vec4Scalar)
-        {
-            hmm_vec4 v4 = HMM_Vec4(1.0f, 2.0f, 3.0f, 4.0f);
-            float s = 2;
-
-            {
-                hmm_vec4 result = HMM_DivideVec4f(v4, s);
-                EXPECT_FLOAT_EQ(result.X, 0.5f);
-                EXPECT_FLOAT_EQ(result.Y, 1.0f);
-                EXPECT_FLOAT_EQ(result.Z, 1.5f);
-                EXPECT_FLOAT_EQ(result.W, 2.0f);
-            }
-#ifdef __cplusplus
-            {
-                hmm_vec4 result = HMM_Divide(v4, s);
-                EXPECT_FLOAT_EQ(result.X, 0.5f);
-                EXPECT_FLOAT_EQ(result.Y, 1.0f);
-                EXPECT_FLOAT_EQ(result.Z, 1.5f);
-                EXPECT_FLOAT_EQ(result.W, 2.0f);
-            }
-            {
-                hmm_vec4 result = v4 / s;
-                EXPECT_FLOAT_EQ(result.X, 0.5f);
-                EXPECT_FLOAT_EQ(result.Y, 1.0f);
-                EXPECT_FLOAT_EQ(result.Z, 1.5f);
-                EXPECT_FLOAT_EQ(result.W, 2.0f);
-            }
-
-            v4 /= s;
-            EXPECT_FLOAT_EQ(v4.X, 0.5f);
-            EXPECT_FLOAT_EQ(v4.Y, 1.0f);
-            EXPECT_FLOAT_EQ(v4.Z, 1.5f);
-            EXPECT_FLOAT_EQ(v4.W, 2.0f);
-#endif
-        }
-        TEST_END()
-
-        TEST_BEGIN(Mat4Scalar)
-        {
-            hmm_mat4 m4 = HMM_Mat4(); // will have 1 - 16
-            float s = 2;
-
-            // Fill the matrix
-            int Counter = 1;
-            for (int Column = 0; Column < 4; ++Column)
-            {
-                for (int Row = 0; Row < 4; ++Row)
-                {
-                    m4.Elements[Column][Row] = Counter;
-                    ++Counter;
-                }
-            }
-
-            // Test the results
-            {
-                hmm_mat4 result = HMM_DivideMat4f(m4, s);
-                EXPECT_FLOAT_EQ(result.Elements[0][0], 0.5f);
-                EXPECT_FLOAT_EQ(result.Elements[0][1], 1.0f);
-                EXPECT_FLOAT_EQ(result.Elements[0][2], 1.5f);
-                EXPECT_FLOAT_EQ(result.Elements[0][3], 2.0f);
-                EXPECT_FLOAT_EQ(result.Elements[1][0], 2.5f);
-                EXPECT_FLOAT_EQ(result.Elements[1][1], 3.0f);
-                EXPECT_FLOAT_EQ(result.Elements[1][2], 3.5f);
-                EXPECT_FLOAT_EQ(result.Elements[1][3], 4.0f);
-                EXPECT_FLOAT_EQ(result.Elements[2][0], 4.5f);
-                EXPECT_FLOAT_EQ(result.Elements[2][1], 5.0f);
-                EXPECT_FLOAT_EQ(result.Elements[2][2], 5.5f);
-                EXPECT_FLOAT_EQ(result.Elements[2][3], 6.0f);
-                EXPECT_FLOAT_EQ(result.Elements[3][0], 6.5f);
-                EXPECT_FLOAT_EQ(result.Elements[3][1], 7.0f);
-                EXPECT_FLOAT_EQ(result.Elements[3][2], 7.5f);
-                EXPECT_FLOAT_EQ(result.Elements[3][3], 8.0f);
-            }
-#ifdef __cplusplus
-            {
-                hmm_mat4 result = HMM_Divide(m4, s);
-                EXPECT_FLOAT_EQ(result.Elements[0][0], 0.5f);
-                EXPECT_FLOAT_EQ(result.Elements[0][1], 1.0f);
-                EXPECT_FLOAT_EQ(result.Elements[0][2], 1.5f);
-                EXPECT_FLOAT_EQ(result.Elements[0][3], 2.0f);
-                EXPECT_FLOAT_EQ(result.Elements[1][0], 2.5f);
-                EXPECT_FLOAT_EQ(result.Elements[1][1], 3.0f);
-                EXPECT_FLOAT_EQ(result.Elements[1][2], 3.5f);
-                EXPECT_FLOAT_EQ(result.Elements[1][3], 4.0f);
-                EXPECT_FLOAT_EQ(result.Elements[2][0], 4.5f);
-                EXPECT_FLOAT_EQ(result.Elements[2][1], 5.0f);
-                EXPECT_FLOAT_EQ(result.Elements[2][2], 5.5f);
-                EXPECT_FLOAT_EQ(result.Elements[2][3], 6.0f);
-                EXPECT_FLOAT_EQ(result.Elements[3][0], 6.5f);
-                EXPECT_FLOAT_EQ(result.Elements[3][1], 7.0f);
-                EXPECT_FLOAT_EQ(result.Elements[3][2], 7.5f);
-                EXPECT_FLOAT_EQ(result.Elements[3][3], 8.0f);
-            }
-            {
-                hmm_mat4 result = m4 / s;
-                EXPECT_FLOAT_EQ(result.Elements[0][0], 0.5f);
-                EXPECT_FLOAT_EQ(result.Elements[0][1], 1.0f);
-                EXPECT_FLOAT_EQ(result.Elements[0][2], 1.5f);
-                EXPECT_FLOAT_EQ(result.Elements[0][3], 2.0f);
-                EXPECT_FLOAT_EQ(result.Elements[1][0], 2.5f);
-                EXPECT_FLOAT_EQ(result.Elements[1][1], 3.0f);
-                EXPECT_FLOAT_EQ(result.Elements[1][2], 3.5f);
-                EXPECT_FLOAT_EQ(result.Elements[1][3], 4.0f);
-                EXPECT_FLOAT_EQ(result.Elements[2][0], 4.5f);
-                EXPECT_FLOAT_EQ(result.Elements[2][1], 5.0f);
-                EXPECT_FLOAT_EQ(result.Elements[2][2], 5.5f);
-                EXPECT_FLOAT_EQ(result.Elements[2][3], 6.0f);
-                EXPECT_FLOAT_EQ(result.Elements[3][0], 6.5f);
-                EXPECT_FLOAT_EQ(result.Elements[3][1], 7.0f);
-                EXPECT_FLOAT_EQ(result.Elements[3][2], 7.5f);
-                EXPECT_FLOAT_EQ(result.Elements[3][3], 8.0f);
-            }
-
-            m4 /= s;
-            EXPECT_FLOAT_EQ(m4.Elements[0][0], 0.5f);
-            EXPECT_FLOAT_EQ(m4.Elements[0][1], 1.0f);
-            EXPECT_FLOAT_EQ(m4.Elements[0][2], 1.5f);
-            EXPECT_FLOAT_EQ(m4.Elements[0][3], 2.0f);
-            EXPECT_FLOAT_EQ(m4.Elements[1][0], 2.5f);
-            EXPECT_FLOAT_EQ(m4.Elements[1][1], 3.0f);
-            EXPECT_FLOAT_EQ(m4.Elements[1][2], 3.5f);
-            EXPECT_FLOAT_EQ(m4.Elements[1][3], 4.0f);
-            EXPECT_FLOAT_EQ(m4.Elements[2][0], 4.5f);
-            EXPECT_FLOAT_EQ(m4.Elements[2][1], 5.0f);
-            EXPECT_FLOAT_EQ(m4.Elements[2][2], 5.5f);
-            EXPECT_FLOAT_EQ(m4.Elements[2][3], 6.0f);
-            EXPECT_FLOAT_EQ(m4.Elements[3][0], 6.5f);
-            EXPECT_FLOAT_EQ(m4.Elements[3][1], 7.0f);
-            EXPECT_FLOAT_EQ(m4.Elements[3][2], 7.5f);
-            EXPECT_FLOAT_EQ(m4.Elements[3][3], 8.0f);
-#endif
-        }
-        TEST_END()
-
-        TEST_BEGIN(QuaternionScalar)
-        {
-            hmm_quaternion q = HMM_Quaternion(1.0f, 2.0f, 3.0f, 4.0f);
-            float f = 2.0f;
-
-            {
-                hmm_quaternion result = HMM_DivideQuaternionF(q, f);
-                EXPECT_FLOAT_EQ(result.X, 0.5f);
-                EXPECT_FLOAT_EQ(result.Y, 1.0f);
-                EXPECT_FLOAT_EQ(result.Z, 1.5f);
-                EXPECT_FLOAT_EQ(result.W, 2.0f);
-            }
-#ifdef __cplusplus
-            {
-                hmm_quaternion result = HMM_Divide(q, f);
-                EXPECT_FLOAT_EQ(result.X, 0.5f);
-                EXPECT_FLOAT_EQ(result.Y, 1.0f);
-                EXPECT_FLOAT_EQ(result.Z, 1.5f);
-                EXPECT_FLOAT_EQ(result.W, 2.0f);
-            }
-            {
-                hmm_quaternion result = q / f;
-                EXPECT_FLOAT_EQ(result.X, 0.5f);
-                EXPECT_FLOAT_EQ(result.Y, 1.0f);
-                EXPECT_FLOAT_EQ(result.Z, 1.5f);
-                EXPECT_FLOAT_EQ(result.W, 2.0f);
-            }
-
-            q /= f;
-            EXPECT_FLOAT_EQ(q.X, 0.5f);
-            EXPECT_FLOAT_EQ(q.Y, 1.0f);
-            EXPECT_FLOAT_EQ(q.Z, 1.5f);
-            EXPECT_FLOAT_EQ(q.W, 2.0f);
-#endif
-        }
-        TEST_END()
-    }
-    CATEGORY_END()
-
-    CATEGORY_BEGIN(Equality)
-    {
-        TEST_BEGIN(Vec2)
-        {
-            hmm_vec2 a = HMM_Vec2(1.0f, 2.0f);
-            hmm_vec2 b = HMM_Vec2(1.0f, 2.0f);
-            hmm_vec2 c = HMM_Vec2(3.0f, 4.0f);
-
-            EXPECT_TRUE(HMM_EqualsVec2(a, b));
-            EXPECT_FALSE(HMM_EqualsVec2(a, c));
-
-#ifdef __cplusplus
-            EXPECT_TRUE(HMM_Equals(a, b));
-            EXPECT_FALSE(HMM_Equals(a, c));
-
-            EXPECT_TRUE(a == b);
-            EXPECT_FALSE(a == c);
-#endif
-        }
-        TEST_END()
-
-        TEST_BEGIN(Vec3)
-        {
-            hmm_vec3 a = HMM_Vec3(1.0f, 2.0f, 3.0f);
-            hmm_vec3 b = HMM_Vec3(1.0f, 2.0f, 3.0f);
-            hmm_vec3 c = HMM_Vec3(4.0f, 5.0f, 6.0f);
-
-            EXPECT_TRUE(HMM_EqualsVec3(a, b));
-            EXPECT_FALSE(HMM_EqualsVec3(a, c));
-
-#ifdef __cplusplus
-            EXPECT_TRUE(HMM_Equals(a, b));
-            EXPECT_FALSE(HMM_Equals(a, c));
-
-            EXPECT_TRUE(a == b);
-            EXPECT_FALSE(a == c);
-#endif
-        }
-        TEST_END()
-
-        TEST_BEGIN(Vec4)
-        {
-            hmm_vec4 a = HMM_Vec4(1.0f, 2.0f, 3.0f, 4.0f);
-            hmm_vec4 b = HMM_Vec4(1.0f, 2.0f, 3.0f, 4.0f);
-            hmm_vec4 c = HMM_Vec4(5.0f, 6.0f, 7.0f, 8.0f);
-
-            EXPECT_TRUE(HMM_EqualsVec4(a, b));
-            EXPECT_FALSE(HMM_EqualsVec4(a, c));
-
-#ifdef __cplusplus
-            EXPECT_TRUE(HMM_Equals(a, b));
-            EXPECT_FALSE(HMM_Equals(a, c));
-
-            EXPECT_TRUE(a == b);
-            EXPECT_FALSE(a == c);
-#endif
-        }
-        TEST_END()
-    }
-    CATEGORY_END()
-
-    CATEGORY_BEGIN(Projection)
-    {
-        TEST_BEGIN(Orthographic)
-        {
-            hmm_mat4 projection = HMM_Orthographic(-10.0f, 10.0f, -5.0f, 5.0f, 0.0f, -10.0f);
-
-            hmm_vec3 original = HMM_Vec3(5.0f, 5.0f, -5.0f);
-            hmm_vec4 projected = HMM_MultiplyMat4ByVec4(projection, HMM_Vec4v(original, 1));
-
-            EXPECT_FLOAT_EQ(projected.X, 0.5f);
-            EXPECT_FLOAT_EQ(projected.Y, 1.0f);
-            EXPECT_FLOAT_EQ(projected.Z, -2.0f);
-            EXPECT_FLOAT_EQ(projected.W, 1.0f);
-        }
-        TEST_END()
-
-        TEST_BEGIN(Perspective)
-        {
-            hmm_mat4 projection = HMM_Perspective(90.0f, 2.0f, 5.0f, 15.0f);
-
-            {
-                hmm_vec3 original = HMM_Vec3(5.0f, 5.0f, -15.0f);
-                hmm_vec4 projected = HMM_MultiplyMat4ByVec4(projection, HMM_Vec4v(original, 1));
-                EXPECT_FLOAT_EQ(projected.X, 5.0f);
-                EXPECT_FLOAT_EQ(projected.Y, 10.0f);
-                EXPECT_FLOAT_EQ(projected.Z, 15.0f);
-                EXPECT_FLOAT_EQ(projected.W, 15.0f);
-            }
-            {
-                hmm_vec3 original = HMM_Vec3(5.0f, 5.0f, -5.0f);
-                hmm_vec4 projected = HMM_MultiplyMat4ByVec4(projection, HMM_Vec4v(original, 1));
-                EXPECT_FLOAT_EQ(projected.X, 5.0f);
-                EXPECT_FLOAT_EQ(projected.Y, 10.0f);
-                EXPECT_FLOAT_EQ(projected.Z, -5.0f);
-                EXPECT_FLOAT_EQ(projected.W, 5.0f);
-            }
-        }
-        TEST_END()
-    }
-    CATEGORY_END()
-
-    CATEGORY_BEGIN(Transformations)
-    {
-        TEST_BEGIN(Translate)
-        {
-            hmm_mat4 translate = HMM_Translate(HMM_Vec3(1.0f, -3.0f, 6.0f));
-
-            hmm_vec3 original = HMM_Vec3(1.0f, 2.0f, 3.0f);
-            hmm_vec4 translated = HMM_MultiplyMat4ByVec4(translate, HMM_Vec4v(original, 1));
-
-            EXPECT_FLOAT_EQ(translated.X, 2.0f);
-            EXPECT_FLOAT_EQ(translated.Y, -1.0f);
-            EXPECT_FLOAT_EQ(translated.Z, 9.0f);
-            EXPECT_FLOAT_EQ(translated.W, 1.0f);
-        }
-        TEST_END()
-
-        TEST_BEGIN(Rotate)
-        {
-            hmm_vec3 original = HMM_Vec3(1.0f, 1.0f, 1.0f);
-
-            hmm_mat4 rotateX = HMM_Rotate(90, HMM_Vec3(1, 0, 0));
-            hmm_vec4 rotatedX = HMM_MultiplyMat4ByVec4(rotateX, HMM_Vec4v(original, 1));
-            EXPECT_FLOAT_EQ(rotatedX.X, 1.0f);
-            EXPECT_FLOAT_EQ(rotatedX.Y, -1.0f);
-            EXPECT_FLOAT_EQ(rotatedX.Z, 1.0f);
-            EXPECT_FLOAT_EQ(rotatedX.W, 1.0f);
-
-            hmm_mat4 rotateY = HMM_Rotate(90, HMM_Vec3(0, 1, 0));
-            hmm_vec4 rotatedY = HMM_MultiplyMat4ByVec4(rotateY, HMM_Vec4v(original, 1));
-            EXPECT_FLOAT_EQ(rotatedY.X, 1.0f);
-            EXPECT_FLOAT_EQ(rotatedY.Y, 1.0f);
-            EXPECT_FLOAT_EQ(rotatedY.Z, -1.0f);
-            EXPECT_FLOAT_EQ(rotatedY.W, 1.0f);
-
-            hmm_mat4 rotateZ = HMM_Rotate(90, HMM_Vec3(0, 0, 1));
-            hmm_vec4 rotatedZ = HMM_MultiplyMat4ByVec4(rotateZ, HMM_Vec4v(original, 1));
-            EXPECT_FLOAT_EQ(rotatedZ.X, -1.0f);
-            EXPECT_FLOAT_EQ(rotatedZ.Y, 1.0f);
-            EXPECT_FLOAT_EQ(rotatedZ.Z, 1.0f);
-            EXPECT_FLOAT_EQ(rotatedZ.W, 1.0f);
-        }
-        TEST_END()
-
-        TEST_BEGIN(Scale)
-        {
-            hmm_mat4 scale = HMM_Scale(HMM_Vec3(2.0f, -3.0f, 0.5f));
-
-            hmm_vec3 original = HMM_Vec3(1.0f, 2.0f, 3.0f);
-            hmm_vec4 scaled = HMM_MultiplyMat4ByVec4(scale, HMM_Vec4v(original, 1));
-
-            EXPECT_FLOAT_EQ(scaled.X, 2.0f);
-            EXPECT_FLOAT_EQ(scaled.Y, -6.0f);
-            EXPECT_FLOAT_EQ(scaled.Z, 1.5f);
-            EXPECT_FLOAT_EQ(scaled.W, 1.0f);
-        }
-        TEST_END()
-    }
-    CATEGORY_END()
-
-#ifdef HANDMADE_MATH__USE_SSE
-    CATEGORY_BEGIN(SSE)
-    {
-        TEST_BEGIN(LinearCombine)
-        {
-            hmm_mat4 MatrixOne = HMM_Mat4d(2.0f);
-            hmm_mat4 MatrixTwo = HMM_Mat4d(4.0f);
-            hmm_mat4 Result;
-            
-            Result.Rows[0] = HMM_LinearCombineSSE(MatrixOne.Rows[0], MatrixTwo);
-            Result.Rows[1] = HMM_LinearCombineSSE(MatrixOne.Rows[1], MatrixTwo);
-            Result.Rows[2] = HMM_LinearCombineSSE(MatrixOne.Rows[2], MatrixTwo);
-            Result.Rows[3] = HMM_LinearCombineSSE(MatrixOne.Rows[3], MatrixTwo);
-            
-            {
-                EXPECT_FLOAT_EQ(Result.Elements[0][0], 8.0f);
-                EXPECT_FLOAT_EQ(Result.Elements[0][1], 0.0f);
-                EXPECT_FLOAT_EQ(Result.Elements[0][2], 0.0f);
-                EXPECT_FLOAT_EQ(Result.Elements[0][3], 0.0f);
-                                
-                EXPECT_FLOAT_EQ(Result.Elements[1][0], 0.0f);
-                EXPECT_FLOAT_EQ(Result.Elements[1][1], 8.0f);                
-                EXPECT_FLOAT_EQ(Result.Elements[1][2], 0.0f);
-                EXPECT_FLOAT_EQ(Result.Elements[1][3], 0.0f);
-
-                                
-                EXPECT_FLOAT_EQ(Result.Elements[2][0], 0.0f);
-                EXPECT_FLOAT_EQ(Result.Elements[2][1], 0.0f);                
-                EXPECT_FLOAT_EQ(Result.Elements[2][2], 8.0f);
-                EXPECT_FLOAT_EQ(Result.Elements[2][3], 0.0f);
-
-                
-                EXPECT_FLOAT_EQ(Result.Elements[3][0], 0.0f);
-                EXPECT_FLOAT_EQ(Result.Elements[3][1], 0.0f);                
-                EXPECT_FLOAT_EQ(Result.Elements[3][2], 0.0f);
-                EXPECT_FLOAT_EQ(Result.Elements[3][3], 8.0f);                
-            }
-            
-        }
-        TEST_END()
-    }
-    CATEGORY_END()
-#endif
-
-    return 0;
+    return hmt_run_all_tests();
 }
diff --git a/test/hmm_test.h b/test/hmm_test.h
new file mode 100644
--- /dev/null
+++ b/test/hmm_test.h
@@ -0,0 +1,17 @@
+#include <float.h>
+
+#include "HandmadeTest.h"
+#include "../HandmadeMath.h"
+
+#include "categories/ScalarMath.h"
+#include "categories/Initialization.h"
+#include "categories/VectorOps.h"
+#include "categories/QuaternionOps.h"
+#include "categories/Addition.h"
+#include "categories/Subtraction.h"
+#include "categories/Multiplication.h"
+#include "categories/Division.h"
+#include "categories/Equality.h"
+#include "categories/Projection.h"
+#include "categories/Transformation.h"
+#include "categories/SSE.h"
diff --git a/test/initializer.h b/test/initializer.h
new file mode 100644
--- /dev/null
+++ b/test/initializer.h
@@ -0,0 +1,29 @@
+// Initializer/finalizer sample for MSVC and GCC/Clang.
+// 2010-2016 Joe Lowe. Released into the public domain.
+#include <stdio.h>
+#include <stdlib.h>
+
+#ifdef __cplusplus
+    #define _INITIALIZER_T(f) f##_t_
+    #define _INITIALIZER_U(f) f##_
+    #define INITIALIZER(f) \
+        static void f(void); \
+        struct _INITIALIZER_T(f) { _INITIALIZER_T(f)(void) { f(); } }; static _INITIALIZER_T(f) _INITIALIZER_U(f); \
+        static void f(void)
+#elif defined(_MSC_VER)
+    #pragma section(".CRT$XCU",read)
+    #define INITIALIZER2_(f,p) \
+        static void f(void); \
+        __declspec(allocate(".CRT$XCU")) void (*f##_)(void) = f; \
+        __pragma(comment(linker,"/include:" p #f "_")) \
+        static void f(void)
+    #ifdef _WIN64
+        #define INITIALIZER(f) INITIALIZER2_(f,"")
+    #else
+        #define INITIALIZER(f) INITIALIZER2_(f,"_")
+    #endif
+#else
+    #define INITIALIZER(f) \
+        static void f(void) __attribute__((constructor)); \
+        static void f(void)
+#endif