Home | History | Annotate | Download | only in examples

Lines Matching refs:rot

120 /* rotate list[0..len-1] left by rot positions, in place */
121 local void rotate(unsigned char *list, unsigned len, unsigned rot)
127 /* normalize rot and handle degenerate cases */
129 if (rot >= len) rot %= len;
130 if (rot == 0) return;
136 if (rot == 1) {
144 if (rot == len - 1) {
152 cycles = gcd(len, rot); /* number of cycles */
158 from += rot; /* go right rot positions */