Use in over ref modifier in Math functions input parameters
This commit is contained in:
@@ -112,7 +112,7 @@ namespace FlaxEngine
|
||||
/// <c>true</c> if <paramref name="left" /> has the same value as <paramref name="right" />; otherwise, <c>false</c>.</returns>
|
||||
public static bool operator ==(Half3 left, Half3 right)
|
||||
{
|
||||
return Equals(ref left, ref right);
|
||||
return Equals(in left, in right);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -125,7 +125,7 @@ namespace FlaxEngine
|
||||
[return: MarshalAs(UnmanagedType.U1)]
|
||||
public static bool operator !=(Half3 left, Half3 right)
|
||||
{
|
||||
return !Equals(ref left, ref right);
|
||||
return !Equals(in left, in right);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -146,7 +146,7 @@ namespace FlaxEngine
|
||||
/// <returns>
|
||||
/// <c>true</c> if <paramref name="value1" /> is the same instance as <paramref name="value2" /> or
|
||||
/// if both are <c>null</c> references or if <c>value1.Equals(value2)</c> returns <c>true</c>; otherwise, <c>false</c>.</returns>
|
||||
public static bool Equals(ref Half3 value1, ref Half3 value2)
|
||||
public static bool Equals(in Half3 value1, in Half3 value2)
|
||||
{
|
||||
return (((value1.X == value2.X) && (value1.Y == value2.Y)) && (value1.Z == value2.Z));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user