This commit is contained in:
Rian Drake 2026-10-15 14:09:11 +13:00
commit b578433e37

View file

@ -0,0 +1,53 @@
// <auto-generated /> - edit Vector.numerics.tt to modify
#nullable enable
namespace Brutal.Numerics;
// INumberBase
public partial struct bool4
{
/// <inheritdoc />
public static bool4 Zero => new(false);
/// <inheritdoc />
public static bool4 One => new(true);
}
// IBitwiseOperators
public partial struct bool4 : IBitwiseOperators<bool4, bool4, bool4>
{
/// <inheritdoc />
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool4 operator |(bool4 a, bool4 b)
{
return new bool4(a.X | b.X, a.Y | b.Y, a.Z | b.Z, a.W | b.W);
}
/// <inheritdoc />
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool4 operator &(bool4 a, bool4 b)
{
return new bool4(a.X & b.X, a.Y & b.Y, a.Z & b.Z, a.W & b.W);
}
/// <inheritdoc />
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool4 operator ^(bool4 a, bool4 b)
{
return new bool4(a.X ^ b.X, a.Y ^ b.Y, a.Z ^ b.Z, a.W ^ b.W);
}
/// <inheritdoc cref="IBitwiseOperators{TSelf, TOther, TResult}.op_OnesComplement" />
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool4 operator !(bool4 value)
{
return new bool4(!value.X, !value.Y, !value.Z, !value.W);
}
// bool has no ~; the interface's complement is componentwise logical not
[MethodImpl(MethodImplOptions.AggressiveInlining)]
static bool4 IBitwiseOperators<bool4, bool4, bool4>.operator ~(bool4 value)
{
return !value;
}
}