change IsAnyKeyDown to IsAnyButtonDown and add Float2.Normalized

This commit is contained in:
Ruan Lucas
2023-01-26 08:54:15 -04:00
parent d20bce9967
commit 82e9923be3
5 changed files with 18 additions and 5 deletions

View File

@@ -267,6 +267,19 @@ namespace FlaxEngine
/// <remarks>This method may be preferred to <see cref="Float2.Length" /> when only a relative length is needed and speed is of the essence.</remarks>
public float LengthSquared => X * X + Y * Y;
/// <summary>
/// Gets the normalized vector. Returned vector has length equal 1.
/// </summary>
public Float2 Normalized
{
get
{
Float2 result = this;
result.Normalize();
return result;
}
}
/// <summary>
/// Converts the vector into a unit vector.
/// </summary>