From a2c176750dfe7cdb659cd5e0120f2be5932da32d Mon Sep 17 00:00:00 2001 From: scorpioblood <77296181+scorpioblood@users.noreply.github.com> Date: Fri, 7 Jun 2024 16:57:45 +0200 Subject: [PATCH] Bug fixes / Remove unecessary code. --- .../Source/Runtime/Core/public/Math/IntVector2.hpp | 12 +++++------- Engine/Source/Runtime/Core/public/Math/Vector2.hpp | 10 +++++----- Engine/Source/Runtime/Core/public/Math/Vector3.hpp | 14 +++++++------- 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/Engine/Source/Runtime/Core/public/Math/IntVector2.hpp b/Engine/Source/Runtime/Core/public/Math/IntVector2.hpp index 3b048d5..5758fa9 100644 --- a/Engine/Source/Runtime/Core/public/Math/IntVector2.hpp +++ b/Engine/Source/Runtime/Core/public/Math/IntVector2.hpp @@ -20,11 +20,11 @@ #ifndef INTVECTOR2_H #define INTVECTOR2_H -#define PIntZeroVector2(type) TIntVector2<##type>(0,0) -#define PIntVectorSouth2(type) TIntVector2<##type>(0,-1) -#define PIntVectorNorth2(type) TIntVector2<##type>(0,1) -#define PIntVectorEast2(type) TIntVector2<##type>(1,0) -#define PIntVectorWest2(type) TIntVector2<##type>(-1,0) +#define PIntZeroVector2(type, aligned) TIntVector2<##type, ##aligned>(0,0) +#define PIntVectorSouth2(type, aligned) TIntVector2<##type, ##aligned>(0,-1) +#define PIntVectorNorth2(type, aligned) TIntVector2<##type, ##aligned>(0,1) +#define PIntVectorEast2(type, aligned) TIntVector2<##type, ##aligned>(1,0) +#define PIntVectorWest2(type, aligned) TIntVector2<##type, ##aligned>(-1,0) namespace Phanes::Core::Math { @@ -36,8 +36,6 @@ namespace Phanes::Core::Math { template struct TIntVector2 { - static_assert(std::is_integral_v, "T must be an integer type."); - public: // Using in combination with a struct and an array allows us the reflect changes of the x and y variables in the comp array and vise versa. diff --git a/Engine/Source/Runtime/Core/public/Math/Vector2.hpp b/Engine/Source/Runtime/Core/public/Math/Vector2.hpp index b20a3d3..626135c 100644 --- a/Engine/Source/Runtime/Core/public/Math/Vector2.hpp +++ b/Engine/Source/Runtime/Core/public/Math/Vector2.hpp @@ -16,11 +16,11 @@ #ifndef VECTOR2_H #define VECTOR2_H -#define PZeroVector2(type) TVector2<##type>(0,0) -#define PVectorSouth2(type) TVector2<##type>(0,-1) -#define PVectorNorth2(type) TVector2<##type>(0,1) -#define PVectorEast2(type) TVector2<##type>(1,0) -#define PVectorWest2(type) TVector2<##type>(-1,0) +#define PZeroVector2(type, aligned) TVector2<##type, ##aligned>(0,0) +#define PVectorSouth2(type, aligned) TVector2<##type, ##aligned>(0,-1) +#define PVectorNorth2(type, aligned) TVector2<##type, ##aligned>(0,1) +#define PVectorEast2(type, aligned) TVector2<##type, ##aligned>(1,0) +#define PVectorWest2(type, aligned) TVector2<##type, ##aligned>(-1,0) namespace Phanes::Core::Math { diff --git a/Engine/Source/Runtime/Core/public/Math/Vector3.hpp b/Engine/Source/Runtime/Core/public/Math/Vector3.hpp index 9f92ad1..1c37e89 100644 --- a/Engine/Source/Runtime/Core/public/Math/Vector3.hpp +++ b/Engine/Source/Runtime/Core/public/Math/Vector3.hpp @@ -18,13 +18,13 @@ #ifndef VECTOR3_H #define VECTOR3_H -#define PZeroVector3(type) TVector3<##type>(0,0,0) -#define PVectorForward3(type) TVector3<##type>(1,0,0) -#define PVectorBackward3(type) TVector3<##type>(-1,0,0) -#define PVectorEast3(type) TVector3<##type>(0,1,0) -#define PVectorWest3(type) TVector3<##type>(0,-1,0) -#define PVectorUp3(type) TVector3<##type>(0,0,1) -#define PVectorDown3(type) TVector3<##type>(0,0,-1) +#define PZeroVector3(type, aligned) TVector3<##type, ##aligned>(0,0,0) +#define PVectorForward3(type, aligned) TVector3<##type, ##aligned>(1,0,0) +#define PVectorBackward3(type, aligned) TVector3<##type, ##aligned>(-1,0,0) +#define PVectorEast3(type, aligned) TVector3<##type, ##aligned>(0,1,0) +#define PVectorWest3(type, aligned) TVector3<##type, ##aligned>(0,-1,0) +#define PVectorUp3(type, aligned) TVector3<##type, ##aligned>(0,0,1) +#define PVectorDown3(type, aligned) TVector3<##type, ##aligned>(0,0,-1) namespace Phanes::Core::Math {