Here is what I want to accomplish. I want to take a set of numbers and shuffle them. That part I have accomplished with random_shuffle. But I want the sequence to always have a number greater than the previous number (until it gets to the end of the range, then start over)but less than a 180 increment. What I am trying to do is index a rotary table on a mill to specific degrees (the original array of numbers)but not in a set pattern. I also want to keep the table indexing in the same direction. That is why I don't want any increments more than 180. That will cause the table to index in the reverse direction (closest way to get there).