diff --git a/src/DotRecast.Core/RcArrays.cs b/src/DotRecast.Core/RcArrays.cs index e8c291a..c06d605 100644 --- a/src/DotRecast.Core/RcArrays.cs +++ b/src/DotRecast.Core/RcArrays.cs @@ -11,6 +11,13 @@ namespace DotRecast.Core { Array.Copy(sourceArray, sourceIndex, destinationArray, destinationIndex, length); } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void Copy(Span sourceArray, int sourceIndex, Span destinationArray, int destinationIndex, int length) + { + sourceArray.Slice(sourceIndex, length).CopyTo(destinationArray.Slice(destinationIndex)); + } + // Type Safe Copy [MethodImpl(MethodImplOptions.AggressiveInlining)]