// - edit Vector.numerics.tt to modify
#nullable enable
namespace Brutal.Numerics;
// INumberBase
public partial struct bool2
{
///
public static bool2 Zero => new(false);
///
public static bool2 One => new(true);
}
// IBitwiseOperators
public partial struct bool2 : IBitwiseOperators
{
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool2 operator |(bool2 a, bool2 b)
{
return new bool2(a.X | b.X, a.Y | b.Y);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool2 operator &(bool2 a, bool2 b)
{
return new bool2(a.X & b.X, a.Y & b.Y);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool2 operator ^(bool2 a, bool2 b)
{
return new bool2(a.X ^ b.X, a.Y ^ b.Y);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool2 operator !(bool2 value)
{
return new bool2(!value.X, !value.Y);
}
// bool has no ~; the interface's complement is componentwise logical not
[MethodImpl(MethodImplOptions.AggressiveInlining)]
static bool2 IBitwiseOperators.operator ~(bool2 value)
{
return !value;
}
}