summaryrefslogtreecommitdiff
path: root/Client/Source/Math/Vector4.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'Client/Source/Math/Vector4.hpp')
-rw-r--r--Client/Source/Math/Vector4.hpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/Client/Source/Math/Vector4.hpp b/Client/Source/Math/Vector4.hpp
new file mode 100644
index 0000000..8fbf7e6
--- /dev/null
+++ b/Client/Source/Math/Vector4.hpp
@@ -0,0 +1,33 @@
+#pragma once
+
+template<typename T>
+struct Vector4Template
+{
+ T x, y, z, w;
+
+ Vector4Template(T x = 0, T y = 0, T z = 0, T w = 0)
+ {
+ this->x = x;
+ this->y = y;
+ this->z = z;
+ this->w = w;
+ }
+
+ inline void Set(T x, T y, T z, T w)
+ {
+ this->x = x;
+ this->y = y;
+ this->z = z;
+ this->w = w;
+ }
+
+ static Vector4Template zero;
+ static Vector4Template one;
+};
+
+template<typename T>
+Vector4Template<T> Vector4Template<T>::zero = Vector4Template(0, 0, 0, 0);
+template<typename T>
+Vector4Template<T> Vector4Template<T>::one = Vector4Template(1, 1, 1, 1);
+
+using Vector4f = Vector4Template<float>; \ No newline at end of file