From 7f1add4bddcc386d1b34ffe3c230f57e276c5814 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Sat, 14 Feb 2026 00:07:34 +0100 Subject: [PATCH] Fix missing `Length` in `Vector4` --- Source/Engine/Core/Math/Vector4.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/Engine/Core/Math/Vector4.h b/Source/Engine/Core/Math/Vector4.h index 5f5e436ad..167937c81 100644 --- a/Source/Engine/Core/Math/Vector4.h +++ b/Source/Engine/Core/Math/Vector4.h @@ -153,6 +153,12 @@ public: return Math::IsOne(X) && Math::IsOne(Y) && Math::IsOne(Z) && Math::IsOne(W); } + // Calculates the length of the vector. + T Length() const + { + return Math::Sqrt(X * X + Y * Y + Z * Z + W * W); + } + /// /// Returns the average arithmetic of all the components. ///