Ejemplo n.º 1
0
 /// <summary>
 /// Shifts a subset of an array of items in place.
 /// </summary>
 public static void Shift <T>(this T[] array, int offset, int from, int to)
 {
     offset = SlurMath.RepeatPos(offset, to - from);
     Reverse(array, from, from + offset);
     Reverse(array, from + offset, to);
     Reverse(array, from, to);
 }