Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
pubby
on Dec 10, 2013
|
parent
|
context
|
favorite
| on:
The origin of zero-based array indexing
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: