mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 13:08:24 +01:00
first
This commit is contained in:
parent
bd62d51ec9
commit
b578433e37
1 changed files with 784842 additions and 0 deletions
53
Brutal.Numerics/Vector/bool4/bool4.numerics.gen.cs
Normal file
53
Brutal.Numerics/Vector/bool4/bool4.numerics.gen.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue