brutal/Brutal.Numerics/Matrix/double4x4/double4x4.equality.gen.cs
Rian Drake b578433e37 first
2026-10-15 17:10:50 +13:00

31 lines
1 KiB
C#

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