Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Random Shuffle question

Status
Not open for further replies.

paul7663

Technical User
Joined
Aug 8, 2003
Messages
1
Location
US
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).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top