...TARGET = get the vector of your target. eg. you.x
...SPEED = set the speed of turning in 'degrees per frame'
//get TARGET's direction from ME
VECTOR pos, temp; vec_set(pos.x, TARGET.x);
vec_to_angle(temp.x, vec_sub(pos.x, my.x));
//calculate the 'difference' from MY current direction
vec_sub(temp.x, my.pan);
//limit 'difference' change-per-frame
vec_set(temp.x, vector( clamp(ang(temp.x), -SPEED, SPEED), 0, 0));
vec_scale(temp.x, time_step); vec_add(my.pan, temp.x);
...
///