1.4 Resolution value type
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
c5f87d352a
commit
7d9c7ba338
3 files changed
+56
-1
No files matched your search
@@ -0,0 +1,11 @@
|
||||
namespace FrameProcessor.Domain;
|
||||
|
||||
public sealed record Resolution(int Width, int Height)
|
||||
{
|
||||
public Resolution ForOrientation(Orientation orientation) => orientation switch
|
||||
{
|
||||
Orientation.Landscape => this,
|
||||
Orientation.Portrait => new Resolution(Height, Width),
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(orientation), orientation, null),
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user