brutal/Brutal.Numerics/Vector/bool4/bool4.numerics.gen.cs
Rian Drake b578433e37 first
2026-10-15 17:10:50 +13:00

53 lines
1.5 KiB
C#

// <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;
}
}