Fix missing Length in Vector4

This commit is contained in:
Wojtek Figat
2026-02-14 00:07:34 +01:00
parent fa17d83501
commit 7f1add4bdd

View File

@@ -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);
}
/// <summary>
/// Returns the average arithmetic of all the components.
/// </summary>