// - edit Vector.numerics.tt to modify
#nullable enable
namespace Brutal.Numerics;
// INumberBase
public partial struct bool4
{
///
public static bool4 Zero => new(false);
///
public static bool4 One => new(true);
}
// IBitwiseOperators
public partial struct bool4 : IBitwiseOperators
{
///
[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);
}
///
[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);
}
///
[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);
}
///
[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.operator ~(bool4 value)
{
return !value;
}
}