// - edit Matrix.equality.tt to modify
#nullable enable
namespace Brutal.Numerics;
public partial struct float4x4
{
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public override readonly bool Equals([NotNullWhen(true)] object? obj)
{
return obj is float4x4 other && Equals(other);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public readonly bool Equals(float4x4 other)
{
// This function needs to account for floating-point equality around NaN
// and so must behave equivalently to the underlying float/float.Equals
return X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z) && W.Equals(other.W);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public override readonly int GetHashCode()
{
return HashCode.Combine(X, Y, Z, W);
}
}