Format code
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user