Calculate the shortest way to rotate, right or left?
<p>Im making a simple computerplayer to my simple 2d action game. it suppose to turn towards me and shoot, but i cant figure out how to calc the shortest path... should it turn left of right if it want to shoot and kill me :P ?</p>

<p>Ive got two angles: cpu_facing (direction the cpu is facing) and player_degree (the angle calculated when cpu is in the center).</p>

<p>(im working with degrees, dont like radian :P)</p>

<p>Anyone done this in javascript?</p>
