mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
41 lines
1,020 B
C#
41 lines
1,020 B
C#
// <auto-generated /> - edit Vector.equality.tt to modify
|
|
#nullable enable
|
|
|
|
namespace Brutal.Numerics;
|
|
|
|
public partial struct long2
|
|
{
|
|
/// <inheritdoc />
|
|
public readonly override int GetHashCode()
|
|
{
|
|
return HashCode.Combine(X, Y);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public readonly bool Equals(long2 other)
|
|
{
|
|
return X.Equals(other.X) && Y.Equals(other.Y);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public readonly override bool Equals([NotNullWhen(true)] object? obj)
|
|
{
|
|
return obj is long2 other && Equals(other);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static bool operator ==(long2 a, long2 b)
|
|
{
|
|
return a.X == b.X && a.Y == b.Y;
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static bool operator !=(long2 a, long2 b)
|
|
{
|
|
return !(a == b);
|
|
}
|
|
}
|