Use more collection expressions in samples and tests

このコミットが含まれているのは:
Sergio Pedri committed 2023-11-24 14:52:57 +01:00
1 親 38d3b769e4
コミット 69304831b3
6ファイル変更
+6 -6

検索条件に一致するファイルはありません

+1 -1
ファイルの表示
@@ -27,7 +27,7 @@ internal static class Formatting
for (int i = 0; i < height; i++)
{
float[] row = array.AsSpan(i * width, width).ToArray();
float[] row = [.. array.AsSpan(i * width, width)];
string text = string.Join(",", row.Select(x => x.ToString(CultureInfo.InvariantCulture).PadLeft(numberWidth)));
Console.WriteLine(text);
+1 -1
ファイルの表示
@@ -3,7 +3,7 @@ using System.Linq;
using ComputeSharp;
using ComputeSharp.Sample;
float[] array = Enumerable.Range(1, 100).Select(static i => (float)i).ToArray();
float[] array = [.. Enumerable.Range(1, 100)];
// Create the graphics buffer
using ReadWriteBuffer<float> gpuBuffer = GraphicsDevice.GetDefault().AllocateReadWriteBuffer(array);