DragonECS-Graphs/src/Utils/ArrayUtility.cs

16 lines
435 B
C#
Raw Normal View History

2023-06-22 14:40:11 +08:00
namespace DCFApixels.DragonECS.Relations.Utils
2023-06-19 01:36:36 +08:00
{
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;
}
}
}