Hi,
Was wondering if anyone could help me with a mathsy programmy problem. Its been driving me nuts:
Given an infinite number of colums, where odd numbered columns have x cells and even numbered columns have y cells. Each cell can hold one object, how do i figure out the column number of the nth item.
For further clarification and example;
x = 4
y = 3
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg810.imageshack.us%2Fimg810%2F8158%2Fselection014.png&hash=f5342dd7271dad9bb67b24d84abd8df131fbc60a)
At the moment i do some stupid while loop to work this out, Id love it if there was a one liner, or simple maths formula. Speed is essential here :(
Thanks for your help guys :)
You could do something like this http://ge.tt/8F1qJO6?c (http://ge.tt/8F1qJO6?c)
How the hell did you figure that out :D?