mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 13:08:24 +01:00
SOURCE DUMP v1
This commit is contained in:
parent
bd62d51ec9
commit
fb20299e9d
1 changed files with 768360 additions and 0 deletions
|
|
@ -0,0 +1,53 @@
|
|||
// <auto-generated /> - edit Vector.numerics.tt to modify
|
||||
#nullable enable
|
||||
|
||||
namespace Brutal.Numerics;
|
||||
|
||||
// INumberBase
|
||||
public partial struct bool2
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public static bool2 Zero => new(false);
|
||||
|
||||
/// <inheritdoc />
|
||||
public static bool2 One => new(true);
|
||||
}
|
||||
|
||||
// IBitwiseOperators
|
||||
public partial struct bool2 : IBitwiseOperators<bool2, bool2, bool2>
|
||||
{
|
||||
/// <inheritdoc />
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static bool2 operator |(bool2 a, bool2 b)
|
||||
{
|
||||
return new bool2(a.X | b.X, a.Y | b.Y);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static bool2 operator &(bool2 a, bool2 b)
|
||||
{
|
||||
return new bool2(a.X & b.X, a.Y & b.Y);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static bool2 operator ^(bool2 a, bool2 b)
|
||||
{
|
||||
return new bool2(a.X ^ b.X, a.Y ^ b.Y);
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IBitwiseOperators{TSelf, TOther, TResult}.op_OnesComplement" />
|
||||
[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<bool2, bool2, bool2>.operator ~(bool2 value)
|
||||
{
|
||||
return !value;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue