change IsAnyKeyDown to IsAnyButtonDown and add Float2.Normalized
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user