mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 04:58:24 +01:00
first
This commit is contained in:
parent
bd62d51ec9
commit
b578433e37
1 changed files with 784842 additions and 0 deletions
47
Brutal.Numerics/Matrix/float3x2/float3x2.access.gen.cs
Normal file
47
Brutal.Numerics/Matrix/float3x2/float3x2.access.gen.cs
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
// <auto-generated /> - edit Matrix.access.tt to modify
|
||||
#nullable enable
|
||||
|
||||
namespace Brutal.Numerics;
|
||||
|
||||
public partial struct float3x2
|
||||
{
|
||||
/// <inheritdoc />
|
||||
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<float> AsSpan()
|
||||
{
|
||||
return MemoryMarshal.CreateSpan(ref Unsafe.As<float3x2, float>(ref this), 6);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public readonly ReadOnlySpan<float> AsReadOnlySpan()
|
||||
{
|
||||
return MemoryMarshal.CreateReadOnlySpan(in Unsafe.As<float3x2, float>(ref Unsafe.AsRef(in this)), 6);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue