コード例 #1
0
 public void CopyTo <TOtherSpan>(int sourceStart, ref TOtherSpan targetSpan, int targetStart, int count) where TOtherSpan : ISpan <T>
 {
     if (typeof(TOtherSpan) == typeof(Buffer <T>))
     {
         SpanHelper.Copy(ref this, sourceStart, ref Unsafe.As <TOtherSpan, Buffer <T> >(ref targetSpan), targetStart, count);
     }
     else if (typeof(TOtherSpan) == typeof(Array <T>))
     {
         SpanHelper.Copy(ref this, sourceStart, ref Unsafe.As <TOtherSpan, Array <T> >(ref targetSpan), targetStart, count);
     }
     else
     {
         SpanHelper.CopyFallback <T, Buffer <T>, TOtherSpan>(ref this, sourceStart, ref targetSpan, targetStart, count);
     }
 }
コード例 #2
0
ファイル: Buffer.cs プロジェクト: LASTEXILE-CH/bepuphysics2
 public void CopyTo(int sourceStart, ref Buffer <T> target, int targetStart, int count)
 {
     SpanHelper.Copy(ref this, sourceStart, ref target, targetStart, count);
 }