Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = current_index % width;
- y = current_index / width; // Assuming integers
- width = total_indices / height;
- height = total_indices / width;
- ------------------------------------
- x = current_index % width;
- 0 = (i=0) % (w=20)
- 1 = (i=1) % (w=20)
- 2 = (i=2) % (w=20)
- ....
- 19 = (i=19) % (w=20)
- 20 = (i=20) % (w=20)
- 21 = (i=21) % (w=20)
- ------------------------------------
- y = current_index / width; // Assuming integers
- 0 = (i=0) / (w=15)
- 0 = (i=1) / (w=15)
- 0 = (i=2) / (w=15)
- ....
- 0 = (i=14) / (w=15)
- 1 = (i=15) / (w=15)
- 1 = (i=16) / (w=15)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement