Never mind, this works better:

playerWeapon.pan += clamp(ang(camera.pan - playerWeapon.pan) * 0.5, -20, 20) * time_step;