Format code

This commit is contained in:
Wojtek Figat
2021-02-27 16:29:30 +01:00
parent 88db7c2d5f
commit ca3948ad69
3 changed files with 17 additions and 8 deletions

View File

@@ -832,7 +832,7 @@ namespace FlaxEngine
value.Normalize();
return value;
}
/// <summary>
/// Makes sure that Length of the output vector is always below max and above 0.
/// </summary>
@@ -840,8 +840,9 @@ namespace FlaxEngine
/// <param name="max">Max Length</param>
public static Vector2 ClampLength(Vector2 vector, float max)
{
return ClampLength(vector, 0, max);
return ClampLength(vector, 0, max);
}
/// <summary>
/// Makes sure that Length of the output vector is always below max and above min.
/// </summary>
@@ -853,6 +854,7 @@ namespace FlaxEngine
ClampLength(ref vector, min, max, out Vector2 retVect);
return retVect;
}
/// <summary>
/// Makes sure that Length of the output vector is always below max and above min.
/// </summary>
@@ -864,7 +866,7 @@ namespace FlaxEngine
{
retVect.X = vector.X;
retVect.Y = vector.Y;
float lenSq = retVect.LengthSquared;
if (lenSq > max * max)
{
@@ -879,6 +881,7 @@ namespace FlaxEngine
retVect.Y = retVect.Y * scaleFactor;
}
}
/// <summary>
/// Returns the vector with components rounded to the nearest integer.
/// </summary>

View File

@@ -991,7 +991,7 @@ namespace FlaxEngine
value.Normalize();
return value;
}
/// <summary>
/// Makes sure that Length of the output vector is always below max and above 0.
/// </summary>
@@ -999,8 +999,9 @@ namespace FlaxEngine
/// <param name="max">Max Length</param>
public static Vector3 ClampLength(Vector3 vector, float max)
{
return ClampLength(vector, 0, max);
return ClampLength(vector, 0, max);
}
/// <summary>
/// Makes sure that Length of the output vector is always below max and above min.
/// </summary>
@@ -1012,6 +1013,7 @@ namespace FlaxEngine
ClampLength(ref vector, min, max, out Vector3 retVect);
return retVect;
}
/// <summary>
/// Makes sure that Length of the output vector is always below max and above min.
/// </summary>
@@ -1024,7 +1026,7 @@ namespace FlaxEngine
retVect.X = vector.X;
retVect.Y = vector.Y;
retVect.Z = vector.Z;
float lenSq = retVect.LengthSquared;
if (lenSq > max * max)
{
@@ -1041,6 +1043,7 @@ namespace FlaxEngine
retVect.Z = retVect.Z * scaleFactor;
}
}
/// <summary>
/// Performs a linear interpolation between two vectors.
/// </summary>

View File

@@ -799,8 +799,9 @@ namespace FlaxEngine
/// <param name="max">Max Length</param>
public static Vector4 ClampLength(Vector4 vector, float max)
{
return ClampLength(vector, 0, max);
return ClampLength(vector, 0, max);
}
/// <summary>
/// Makes sure that Length of the output vector is always below max and above min.
/// </summary>
@@ -812,6 +813,7 @@ namespace FlaxEngine
ClampLength(ref vector, min, max, out Vector4 retVect);
return retVect;
}
/// <summary>
/// Makes sure that Length of the output vector is always below max and above min.
/// </summary>
@@ -825,7 +827,7 @@ namespace FlaxEngine
retVect.Y = vector.Y;
retVect.Z = vector.Z;
retVect.W = vector.W;
float lenSq = retVect.LengthSquared;
if (lenSq > max * max)
{
@@ -844,6 +846,7 @@ namespace FlaxEngine
retVect.W = retVect.W * scaleFactor;
}
}
/// <summary>
/// Performs a linear interpolation between two vectors.
/// </summary>