Circular interation between array
Here is a tip to easly navigate between array
Next interation
int i = (i+1) % targetArray.Count
Prev interation
int i = (i + (targetArray.Count-1)) % targetArray.Count;
Written by Bruno Mikoski
Related protips
1 Response
this is what I was looking for !
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Tips
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#