.config
.vscode
BlurHash
BlurHash.Core
BlurHash.System.Drawing.Common
Compare
Date-Group
Delete-By-Distinct
Delete-By-Relative
Distance
Drag-Drop-Explorer
Drag-Drop-Move
Drag-Drop-Search
Duplicate-Search
Face
FaceParts
FaceRecognitionDotNet
Instance
Map
Metadata
Move-By-Id
Person
PhotoPrism
PrepareForOld
Property
Property-Compare
Rename
Resize
Shared
Tests
TestsWithFaceRecognitionDotNet
ThumbHash
.vscode
Models
SpanOwner.cs
ThumbHash.Channel.cs
ThumbHash.RGBA.cs
ThumbHash.cs
ThumbHasher.cs
ThumbHash.csproj
.editorconfig
.gitattributes
.gitignore
.txt
View-by-Distance-MKLink-Console.sln
package.json
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;
|
|
}
|
|
|
|
}
|
|
} |