The difference between two angles

Given you're at angle X, and you want to be at angle Y, which way do you turn?

At first, it looks like you can just subtract them, but that doesn't work - it breaks down at the edges (i.e. you're at 1 and you want to go to 359).

Happily, the kind folks on #pyweek were willing to help me out. For future reference, the answer is: Make a vector facing angle X and a vector facing angle Y. Take the cross product and look at the sign of the Z term (assuming X and Y are in the X-Y plane!) - this tells you which way to turn.

I got that working and have thus uploaded a screenshot of 10 cops and 1 robber (i.e. you). Happily those white dots on the field are their waypoints, and they're chasing them and not you.

So far....!