I urgently need to know what these lines of code do?
gravityX = gravityX * 0.85D - Math.sin(bearing) / enemyDist;
gravityY = gravityY * 0.85D - Math.cos(bearing) / enemyDist;
This is a code snippet from the DustBunny nano bot, in which uses anti-gravity. I read through the anti-gravity articles, but this doesn't seem like them. Even picking them slightly apart would help me a lot.
+ 1.0D / getX() - 1.0D / (fieldX - getX()), gravityY + 1.0D
/ getY() - 1.0D / (fieldY - getY()))
I understand the force acting, but was is D?