31 lines
765 B
C#
31 lines
765 B
C#
using System.Runtime.CompilerServices;
|
|
|
|
namespace View_by_Distance.ThumbHash.Models;
|
|
|
|
public static partial class ThumbHash
|
|
{
|
|
private readonly ref struct Channel
|
|
{
|
|
|
|
public float DC { init; get; }
|
|
public SpanOwner<float> AC { init; get; }
|
|
public float Scale { init; get; }
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public Channel(float dc, SpanOwner<float> ac, float scale)
|
|
{
|
|
DC = dc;
|
|
AC = ac;
|
|
Scale = scale;
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void Deconstruct(out float dc, out SpanOwner<float> ac, out float scale)
|
|
{
|
|
dc = DC;
|
|
ac = AC;
|
|
scale = Scale;
|
|
}
|
|
|
|
}
|
|
} |