Welcome To Snipplr
Everyone's Recent Pseudocode Snippets Tagged array
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
« Prev 1 Next »
Convert a coordinate (x,y) into the index for a 1D array. For example, the coordinate (3,1) would be at array index 8 if there are 5 columns.
Assumption: Arrays start at 0.
0
869
posted 14 years ago by helloworlder
« Prev 1 Next »