mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 18:14:37 +08:00
16 lines
425 B
C#
16 lines
425 B
C#
namespace DCFApixels.DragonECS.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;
|
|
}
|
|
}
|
|
}
|