Search:

Type: Posts; User: Norm

Search: Search took 0.15 seconds.

  1. Replies
    6
    Views
    4,037

    Re: Shuffling a 2D array

    You can simulate a 2 dim array with a one dim array by using an equation to compute the index given the row and column.
    Something like: ix = row*nbrcols + col (off the top of my head, I'm sure it...
  2. Replies
    6
    Views
    4,037

    Re: Shuffling a 2D array

    Use a nested loop for the 2 dim and have a separate index for the one dim

    Why are you using a 2 dim array? With a little arithmetic you can use a one dim array almost as easily as a 2 dim array.
  3. Replies
    6
    Views
    4,037

    Re: Shuffling a 2D array

    Do you want all 16 items in the array to be shuffled as if they were in a single array, or do you want what is in row to be shuffled only within that row or column?
    If all elements as in a single...
Results 1 to 3 of 3