diff options
Diffstat (limited to 'Runtime/Math/Vector3.h')
-rw-r--r-- | Runtime/Math/Vector3.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/Runtime/Math/Vector3.h b/Runtime/Math/Vector3.h index e81e880..c7e5232 100644 --- a/Runtime/Math/Vector3.h +++ b/Runtime/Math/Vector3.h @@ -3,17 +3,17 @@ namespace Internal { - - struct Vector3 + template<typename T> + struct Vector3T { - float x, y, z; - Vector3(float x = 0, float y = 0, float z = 0) + T x, y, z; + Vector3T(T x = 0, T y = 0, T z = 0) { this->x = x; this->y = y; this->z = z; } - inline void Set(float x, float y, float z) + inline void Set(T x, T y, T z) { this->x = x; this->y = y; @@ -21,11 +21,15 @@ namespace Internal } - static Vector3 zero; - static Vector3 one; + static Vector3T zero; + static Vector3T one; }; + template<typename T> + Vector3T<T> Vector3T<T>::zero = Vector3T(0, 0, 0); + template<typename T> + Vector3T<T> Vector3T<T>::one = Vector3T(1, 1, 1); } #endif
\ No newline at end of file |