I've been doing some more work with my Steering Behaviour library. It was originally tightly integrated to box2d and its data types. I've been working to make it more modular and not dependant on anything other then the flash library.
This has been going well, although I was running into a particular problem with the Wander behaviour, where the objects using it would just circle around clockwise. This was obviously not the correct behaviour!
Going over the code, I realized that i'd set a default wander position as Point(0, 10). Do you see my mistake? I was making an assumption that the local angle of 0 was aligned with the positive Y axis. Not so, it points to the positive X axis! What I should have had, and now do, is Point(10,0).
It took me longer then it should have to fix this because I didn't have a visualization of what the Wander() function was returning. As soon as I visually added that info to the screen, it became obvious what was going wrong.
So, two points to take home today! One - remember which axis is aligned with 0 rad/degrees! Two - if you can plot your data to the screen for debugging, do so!