Angle cross-zone problem in yaw control

May I ask how the ardupilot handles the cross-zone problem between the current yaw Angle and the expected yaw Angle? The range of both is -180 degrees to 180 degrees, but during yaw control, the difference between the two will fluctuate greatly at the interval boundary