mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
31 lines
1,014 B
C#
31 lines
1,014 B
C#
// <auto-generated /> - edit Matrix.equality.tt to modify
|
|
#nullable enable
|
|
|
|
namespace Brutal.Numerics;
|
|
|
|
public partial struct float3x2
|
|
{
|
|
/// <inheritdoc cref="Matrix3x2.Equals(object?)" />
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public override readonly bool Equals([NotNullWhen(true)] object? obj)
|
|
{
|
|
return obj is float3x2 other && Equals(other);
|
|
}
|
|
|
|
/// <inheritdoc cref="Matrix3x2.Equals(Matrix3x2)" />
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public readonly bool Equals(float3x2 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);
|
|
}
|
|
|
|
/// <inheritdoc cref="Matrix3x2.GetHashCode()" />
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public override readonly int GetHashCode()
|
|
{
|
|
return HashCode.Combine(X, Y, Z);
|
|
}
|
|
}
|