brutal/Brutal.Numerics/Vector/bool3/bool3.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 bool3
{
/// <inheritdoc />
public static bool3 Zero => new(false);
/// <inheritdoc />
public static bool3 One => new(true);
}
// IBitwiseOperators
public partial struct bool3 : IBitwiseOperators<bool3, bool3, bool3>
{
/// <inheritdoc />
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool3 operator |(bool3 a, bool3 b)
{
return new bool3(a.X | b.X, a.Y | b.Y, a.Z | b.Z);
}
/// <inheritdoc />
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool3 operator &(bool3 a, bool3 b)
{
return new bool3(a.X & b.X, a.Y & b.Y, a.Z & b.Z);
}
/// <inheritdoc />
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool3 operator ^(bool3 a, bool3 b)
{
return new bool3(a.X ^ b.X, a.Y ^ b.Y, a.Z ^ b.Z);
}
/// <inheritdoc cref="IBitwiseOperators{TSelf, TOther, TResult}.op_OnesComplement" />
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool3 operator !(bool3 value)
{
return new bool3(!value.X, !value.Y, !value.Z);
}
// bool has no ~; the interface's complement is componentwise logical not
[MethodImpl(MethodImplOptions.AggressiveInlining)]
static bool3 IBitwiseOperators<bool3, bool3, bool3>.operator ~(bool3 value)
{
return !value;
}
}