// get the angle to the enemy
VECTOR vDirection;
ANGLE vTargetAngle;
vec_diff(vDirection,enemy.x,my.x);
vec_to_angle(vTargetAngle,vDirection);
// vAngle is now the angle to the enemy.
// Turn right or left depending on the difference
// between the current and the target pan angle
my.pan += time_step * sign(ang(vTargetAngle.pan - my.pan));