How to find even numbers in cp[i]?
var cp = pp.marginPreferences.columnsPositions;
I now want to distinguish between odd and even numbers.
cp[1], cp[3], cp[5]
cp[2], cp[4], cp[6]
I previously used cp[2*i] to represent even numbers and cp[2*i-1] to represent odd numbers, but in practice, as the numbers grow larger, the logic becomes confusing.
For example, when i=11, 2*i becomes 22, which is no longer near 11.
I think the correct logic should be:
Odd number + 1 = Even number.
