View Single Post
Old 12th September 2022, 17:25   #1  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,407
Row and column given the position?

Code:
Chemical.Row = int((i-i%cols)/cols+1) if i%cols > 0 else int((i-i%cols)/cols)
Is there a better way to get the row and column given the position? I have been using this method for years, but it has always felt like there should be a simpler way to do it.
__________________
madVR options explained
Asmodian is offline   Reply With Quote