Jump to content

1337GameDev

New Members
  • Posts

    1
  • Joined

  • Last visited

Profile Information

  • Favorite Area of Science
    Computer Science and Programming

1337GameDev's Achievements

Lepton

Lepton (1/13)

0

Reputation

  1. I am making a 2d grid out of a single array and need to access locations around a given index. The array represents a 2d grid, where the array spirals out from an origin location (index 0). The reason for the spiral is to allow my 2d grid to grow large in all directions. How do I calculate the indices of the locations to the right, left, above and below the given index location? Here is an image to help:
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.