Hey all my new game features a boomerang and I have figured two ways to calculate the path for the boomerang (without the return arc, I'll work on that later).
First of all draw a line of "range" length from the centre of the hero sprite, divide that into 20 - "speed" nodes (i.e. higher speeds leads to less nodes leads to it moving along its path faster) and store the nodes in an array to be sequentially ran through by each call of updateSprite()
Second create a for loop that increments and X and Y position each iteration and stores the results as nodes in an array.
My question is, which is less memory/processor intensive?
Neither should really damage your memory too much...go with the one that'd be easier to program.