// - edit Matrix.access.tt to modify
#nullable enable
namespace Brutal.Numerics;
public partial struct float3x2
{
///
public float this[int row, int column]
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
readonly get
{
if ((uint)row >= RowCount)
throw new ArgumentOutOfRangeException(nameof(row));
return Unsafe.Add(ref Unsafe.AsRef(in X), row)[column];
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
set
{
if ((uint)row >= RowCount)
throw new ArgumentOutOfRangeException(nameof(row));
Unsafe.Add(ref X, row)[column] = value;
}
}
public readonly void Deconstruct(out float2 x, out float2 y, out float2 z)
{
x = X;
y = Y;
z = Z;
}
public Span AsSpan()
{
return MemoryMarshal.CreateSpan(ref Unsafe.As(ref this), 6);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public readonly ReadOnlySpan AsReadOnlySpan()
{
return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As(ref Unsafe.AsRef(in this)), 6);
}
}