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
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