mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
28 lines
885 B
C#
28 lines
885 B
C#
// <auto-generated /> - edit Vector.copy.tt to modify
|
|
#nullable enable
|
|
|
|
namespace Brutal.Numerics;
|
|
|
|
public partial struct bool3
|
|
{
|
|
/// <inheritdoc />
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public readonly void CopyTo(Span<bool> destination)
|
|
{
|
|
if (destination.Length < ComponentCount)
|
|
throw new ArgumentException("Length must be at least 3.", nameof(destination));
|
|
|
|
Unsafe.WriteUnaligned(ref Unsafe.As<bool, byte>(ref MemoryMarshal.GetReference(destination)), this);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public readonly bool TryCopyTo(Span<bool> destination)
|
|
{
|
|
if (destination.Length < ComponentCount)
|
|
return false;
|
|
|
|
Unsafe.WriteUnaligned(ref Unsafe.As<bool, byte>(ref MemoryMarshal.GetReference(destination)), this);
|
|
return true;
|
|
}
|
|
}
|