They seem to be randomly offset, or at least I can't see a pattern. I've followed suggestions and made some changes to the gravity methods, which I've posted at http://pastebin.com/m5e53fe34 for the syntax highlighting. Maybe if you watch what's happening it would become apparent, so I've...
Gravity doesn't behave in the way you'd expect, it causes things to move round in seemingly random directions which don't appear to follow a pattern.
The subtracting thing was my way of trying to keep the angle positive. Ie: between 0 and 2pi and avoiding -1pi or 7pi, but I've since found...
I'm pulling my hair out with this problem. I have two bodies and I'm trying to calculate gravity between them. This is for a game, and there are actually three bodies currently, each frame, I check the distance each one moves due to gravity and store it in a cache (to simulate gravity acting on...