mirror of
https://github.com/DarthAffe/HPPH.git
synced 2026-11-09 18:36:34 +00:00
Added Span-overload for MinMax
This commit is contained in:
1 parent
d0f2e2d983
commit
9f313f77fb
1 file changed
+3
@@ -43,6 +43,9 @@ public static unsafe partial class PixelHelper
|
|||||||
ArrayPool<T>.Shared.Return(array);
|
ArrayPool<T>.Shared.Return(array);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public static IMinMax MinMax<T>(this Span<T> colors)
|
||||||
|
where T : struct, IColor
|
||||||
|
=> T.ColorFormat.MinMax(MemoryMarshal.AsBytes(colors));
|
||||||
|
|
||||||
public static IMinMax MinMax<T>(this ReadOnlySpan<T> colors)
|
public static IMinMax MinMax<T>(this ReadOnlySpan<T> colors)
|
||||||
where T : struct, IColor
|
where T : struct, IColor
|
||||||
|
|||||||
Reference in new issue
Block a user