-
Noob Question — Specifying X and Y
Hi there. I’m going through the book ‘After Effects — The Power of Expressions’ and keep getting stuck on something in my head.
It’s a section about writing an expression that limits your position to round numbers,
x = position[0];
y = position [1];
[Math.round(x),Math,round(y)];my question is why does the [0] and [1] appear in square brackets like this? Is it because it’s pulling from the first and and second position coordinates that are an array, so they have be called out in square brackets?
And secondly, why are (x) and (y) called out in regular bracket and not called out in square brackets?
Any help much appreciated!