Turns out atan2 returns -pi to pi, instead of pi to 2pi like I was
expecting.  That's stupid.  So  I made it return pi to 2pi instead,
and that fixed the issue.  Next up: when you attack something, it will
target you and an arbitrary targetting system that will allow you to
lock onto a target.