Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This makes indexing 2d arrays as 1d arrays a lot easier. With 0-based, index = x + y * width, while 1-based, index = ((x-1) + (y-1) * width) + 1


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: