Optimize UI in Editor

This commit is contained in:
Wojtek Figat
2021-11-27 13:07:09 +01:00
parent a9c56caf84
commit 74f813ed3e
11 changed files with 204 additions and 165 deletions

View File

@@ -1680,7 +1680,7 @@ namespace FlaxEngine
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public bool Equals(Vector4 other)
{
return Equals(ref other);
return Mathf.NearEqual(other.X, X) && Mathf.NearEqual(other.Y, Y) && Mathf.NearEqual(other.Z, Z) && Mathf.NearEqual(other.W, W);
}
/// <summary>
@@ -1692,11 +1692,9 @@ namespace FlaxEngine
/// </returns>
public override bool Equals(object value)
{
if (!(value is Vector4))
if (!(value is Vector4 other))
return false;
var strongValue = (Vector4)value;
return Equals(ref strongValue);
return Mathf.NearEqual(other.X, X) && Mathf.NearEqual(other.Y, Y) && Mathf.NearEqual(other.Z, Z) && Mathf.NearEqual(other.W, W);
}
}
}