My trigonometric calculations get very strange results. What is wrong?
Normal trigonometry is counter-clockwise (the angle increases to the left) but in Robocode it is clock-wise(the angle increases to the right). It means that you can not directly apply the normal trigonometric formulas to Robocode, but have to convert. Basically, it means to use sin where you should use cos and cos where you should use sin. See the RobocodeTrigTutorial for further information.