Add yaw in correct direction

I got two points A,B then A is equal to the camera SpringArm world rotation converted to 0-360º and B is my direction of my actor converted to 0-360º the two A and B are floats of Yaw from 0 to 360.

What i need is with + or - give a value to “Add Controller Yaw Input” for move to B angle (“Add Controller Yaw Input” move A) this need use the short path and when the A value are the same or ±10º of the B stop the add, this all need go to the tick or to a loop to check when the values are different and start the movement.