This is probably a mundane question but I am wondering what is the most efficient method to reset a Point.
1: Allocate a new Point
myPoint = new Point();
2: Set the point properties manually
myPoint.x = 0; myPoint.y = 0;
3: Normalize its length
My guess would be myPoint.x = myPoint.y = 0;
The others require function calls.
If it is in a loop and myPoint is a member variable, use a local variable.
That is also my pick, but it is a pretty annoying thing to code for each reset. This is where a pre compiler and macro definition would be so usefull. I guess this is old school coding by today standard...who cares about performances.