From 60cbbdec07ab7a5636eac5b3c024ae44e937f4d4 Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 13 Dec 2021 00:07:19 +0800 Subject: +init --- Client/Source/Math/Vector4.hpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Client/Source/Math/Vector4.hpp (limited to 'Client/Source/Math/Vector4.hpp') 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 +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 +Vector4Template Vector4Template::zero = Vector4Template(0, 0, 0, 0); +template +Vector4Template Vector4Template::one = Vector4Template(1, 1, 1, 1); + +using Vector4f = Vector4Template; \ No newline at end of file -- cgit v1.1-26-g67d0