There are a couple of answers to this question, but they leave out the sign. Is there a clever way to determine if the angle is positive or negative?
This nice formula gives the angle, but not the direction - any clever hints? $$ d(,) = \min\{360−|A-B|,|A-B|\} $$
If I understand correctly, you are given a pair of angles $A$ and $B$ on the standard $360^\circ$ circle and would like to know the direction of the difference angle between them.
Firstly, the actual difference formula you cite assumes $A,B$ are between $0^\circ$ and $360^\circ$, it won't work with larger angles. For example, $720^\circ = 0^\circ$ since it's just 2 rotations around the full circle, and so is $1440^\circ$, but your formula will not give $0^\circ$, just be careful with it.
The direction of the difference is given by the sign of the actual difference $A-B$. In other words, the difference is positive when $$ A > B \iff A - B > 0 \iff \mathrm{sign}(A-B) = 1. $$