mirror of
https://github.com/DCFApixels/DragonECS-Graphs.git
synced 2025-09-19 04:24:35 +08:00
19 lines
488 B
C#
19 lines
488 B
C#
![]() |
using System;
|
|||
|
using System.Runtime.InteropServices;
|
|||
|
|
|||
|
namespace DCFApixels.DragonECS.Relations.Utils
|
|||
|
{
|
|||
|
internal static class ArrayUtility
|
|||
|
{
|
|||
|
public static void Fill<T>(T[] array, T value, int startIndex = 0, int length = -1)
|
|||
|
{
|
|||
|
if (length < 0)
|
|||
|
length = array.Length;
|
|||
|
else
|
|||
|
length = startIndex + length;
|
|||
|
for (int i = startIndex; i < length; i++)
|
|||
|
array[i] = value;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|