mirror of
https://github.com/DCFApixels/DragonECS-Graphs.git
synced 2025-09-17 19:24:36 +08:00
16 lines
435 B
C#
16 lines
435 B
C#
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;
|
|
}
|
|
}
|
|
}
|