From 1efee8b366280cd89df791d29d0a4f05fa4c5e96 Mon Sep 17 00:00:00 2001 From: scorpioblood <77296181+scorpioblood@users.noreply.github.com> Date: Tue, 21 May 2024 20:58:27 +0200 Subject: [PATCH] Bug fixes. --- Engine/src/Runtime/Core/public/Math/Vector2.hpp | 4 ++-- Engine/src/Runtime/Core/public/Math/Vector3.hpp | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Engine/src/Runtime/Core/public/Math/Vector2.hpp b/Engine/src/Runtime/Core/public/Math/Vector2.hpp index a914ce8..99944df 100644 --- a/Engine/src/Runtime/Core/public/Math/Vector2.hpp +++ b/Engine/src/Runtime/Core/public/Math/Vector2.hpp @@ -319,7 +319,7 @@ namespace Phanes::Core::Math { */ template - T operator* (const TVector2& v1, const TVector2& v2) + inline T operator* (const TVector2& v1, const TVector2& v2) { return v1.x * v2.x + v1.y * v2.y; } @@ -587,7 +587,7 @@ namespace Phanes::Core::Math { */ template - T DotP(const TVector2& v1, const TVector2& v2) + inline T DotP(const TVector2& v1, const TVector2& v2) { return v1.x * v2.x + v1.y * v2.y; } diff --git a/Engine/src/Runtime/Core/public/Math/Vector3.hpp b/Engine/src/Runtime/Core/public/Math/Vector3.hpp index cb86fe0..46c0cad 100644 --- a/Engine/src/Runtime/Core/public/Math/Vector3.hpp +++ b/Engine/src/Runtime/Core/public/Math/Vector3.hpp @@ -277,7 +277,7 @@ namespace Phanes::Core::Math { template TVector3 operator* (const TVector3& v1, T s) { - return TVector3(v1.x * s.v1.y * s, v1.z * s); + return TVector3(v1.x * s, v1.y * s, v1.z * s); } /** @@ -293,7 +293,7 @@ namespace Phanes::Core::Math { TVector3 operator/ (const TVector3& v1, T s) { s = (T)1.0 / s; - return TVector3(v1.x * s.v1.y * s, v1.z * s); + return TVector3(v1.x * s, v1.y * s, v1.z * s); } /** @@ -336,7 +336,7 @@ namespace Phanes::Core::Math { */ template - T operator* (const TVector3& v1, const TVector3& v2) + inline T operator* (const TVector3& v1, const TVector3& v2) { return v1.x * v2.x + v1.y * v2.y + v1.z * v2.z; } @@ -353,7 +353,7 @@ namespace Phanes::Core::Math { template TVector3 operator+ (const TVector3& v1, T s) { - return TVector3(v1.x + s.v1.y + s, v1.z + s); + return TVector3(v1.x + s, v1.y + s, v1.z + s); } /** @@ -383,7 +383,7 @@ namespace Phanes::Core::Math { template TVector3 operator- (const TVector3& v1, T s) { - return TVector3(v1.x - s.v1.y - s, v1.z - s); + return TVector3(v1.x - s, v1.y - s, v1.z - s); } /** @@ -570,7 +570,7 @@ namespace Phanes::Core::Math { */ template - T DotP(const TVector3& v1, const TVector3& v2) + inline T DotP(const TVector3& v1, const TVector3& v2) { return v1.x * v2.x + v1.y * v2.y + v1.z * v2.z; }