From 7cfcacf0cd54cc23732875e74535896263f09932 Mon Sep 17 00:00:00 2001
From: W2Wizard <63303990+W2Wizard@users.noreply.github.com>
Date: Tue, 20 Apr 2021 18:21:27 +0200
Subject: [PATCH] Remove Unit Direction method
---
Source/Engine/Core/Math/Vector3.cs | 11 -----------
Source/Engine/Core/Math/Vector3.h | 10 ----------
2 files changed, 21 deletions(-)
diff --git a/Source/Engine/Core/Math/Vector3.cs b/Source/Engine/Core/Math/Vector3.cs
index 241865c21..2674b30e6 100644
--- a/Source/Engine/Core/Math/Vector3.cs
+++ b/Source/Engine/Core/Math/Vector3.cs
@@ -1245,17 +1245,6 @@ namespace FlaxEngine
return new Vector3(Math.Abs(v.X), Math.Abs(v.Y), Math.Abs(v.Z));
}
- ///
- /// Given two points, will return the unit direction.
- ///
- /// The start position.
- /// The target position.
- /// The unit direction from a to b.
- public static Vector3 UnitDirection(Vector3 a, Vector3 b)
- {
- return (b - a).Normalized;
- }
-
///
/// Projects a vector onto another vector.
///
diff --git a/Source/Engine/Core/Math/Vector3.h b/Source/Engine/Core/Math/Vector3.h
index 5d9c9b7b4..ee7f8b8b4 100644
--- a/Source/Engine/Core/Math/Vector3.h
+++ b/Source/Engine/Core/Math/Vector3.h
@@ -902,16 +902,6 @@ public:
/// The triangle area.
static float TriangleArea(const Vector3& v0, const Vector3& v1, const Vector3& v2);
- ///
- /// Given two points, will return the unit direction.
- ///
- /// The start position.
- /// The target position.
- /// The unit direction from a to b.
- static Vector3 UnitDirection(const Vector3& a, const Vector3& b)
- {
- return (b - a).GetNormalized();
- }
};
inline Vector3 operator+(float a, const Vector3& b)