diff --git a/Code/core/include/Vector3.hpp b/Code/core/include/Vector3.hpp deleted file mode 100644 index ce6f64b..0000000 --- a/Code/core/include/Vector3.hpp +++ /dev/null @@ -1,114 +0,0 @@ -#pragma once - -#include "Math.hpp" - -namespace TiltedPhoques -{ - template - struct Vector3 - { - Vector3() noexcept : m_x(0), m_y(0), m_z(0) {} - Vector3(T aX, T aY, T aZ) noexcept : m_x(aX), m_y(aY), m_z(aZ) {} - Vector3(const Vector3&) noexcept = default; - Vector3(Vector3&&) noexcept = default; - ~Vector3() noexcept = default; - - Vector3& operator=(const Vector3&) noexcept = default; - Vector3& operator=(Vector3&&) noexcept = default; - - bool operator==(const Vector3& acRhs) const noexcept - { - return m_x == acRhs.m_x && m_y == acRhs.m_y && acRhs.m_z == m_z; - } - - bool operator!=(const Vector3& acRhs) const noexcept - { - return !operator==(acRhs); - } - - Vector3 operator+(const Vector3& acRhs) const noexcept - { - return Vector3(m_x + acRhs.m_x, m_y + acRhs.m_y, m_z + acRhs.m_z); - } - - Vector3& operator+=(const Vector3& acRhs) noexcept - { - m_x += acRhs.m_x; - m_z += acRhs.m_y; - m_z += acRhs.m_z; - - return *this; - } - - Vector3 operator-(const Vector3& acRhs) const noexcept - { - return Vector3(m_x - acRhs.m_x, m_y - acRhs.m_y, m_z - acRhs.m_z); - } - - Vector3& operator-=(const Vector3& acRhs) noexcept - { - m_x -= acRhs.m_x; - m_z -= acRhs.m_y; - m_z -= acRhs.m_z; - - return *this; - } - - Vector3 operator*(T aRhs) const noexcept - { - return Vector3(m_x * aRhs, m_y * aRhs, m_z * aRhs); - } - - Vector3& operator*=(T aRhs) noexcept - { - m_x *= aRhs; - m_z *= aRhs; - m_z *= aRhs; - - return *this; - } - - Vector3 operator/(T aRhs) const noexcept - { - const auto reverse = T(1) / aRhs; - return operator*(reverse); - } - - Vector3& operator/=(T aRhs) noexcept - { - const auto reverse = T(1) / aRhs; - return operator*=(reverse); - } - - [[nodiscard]] T LengthSquared() const noexcept - { - return m_x * m_x + m_y * m_y + m_z * m_z; - } - - [[nodiscard]] T Length() const noexcept - { - return Sqrt(m_x * m_x + m_y * m_y + m_z * m_z); - } - - [[nodiscard]] Vector3 Normalize() const noexcept - { - return *this / Length(); - } - - void Decompose(T& aX, T& aY, T& aZ) const noexcept - { - aX = m_x; - aY = m_y; - aZ = m_z; - } - - T m_x; - T m_y; - T m_z; - }; - -#ifndef TP_VECTOR3_FORCE_INSTANTIATION - extern template struct Vector3; - extern template struct Vector3; -#endif -} diff --git a/Code/core/src/Vector3.cpp b/Code/core/src/Vector3.cpp deleted file mode 100644 index f62f70a..0000000 --- a/Code/core/src/Vector3.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include - -namespace TiltedPhoques -{ - template struct Vector3; - template struct Vector3; -} diff --git a/xmake.lua b/xmake.lua index c707e41..8c2e735 100644 --- a/xmake.lua +++ b/xmake.lua @@ -2,8 +2,8 @@ set_languages("cxx17") set_xmakever("2.5.1") -add_requires("mimalloc", "hopscotch-map", {configs = {rltgenrandom = true }}) -add_requires("catch2") +add_requires("mimalloc", "hopscotch-map", "catch2") +add_requireconfs("mimalloc", {configs = {rltgenrandom = true}}) add_rules("mode.debug","mode.releasedbg", "mode.release") add_rules("plugin.vsxmake.autoupdate")