If A-B be in A-B A else B eh?
Python, 27 bytes



lambda a,b:[a,b][2*b*b&gt;a*b]


Try it online!

An arithmetic formula. Why is the negation of 2*b*b&gt;a*b equivalent to the problem condition a-b in symrange(a,b)?

Note that x in symrange(a,b) is equivalent to 0 in symrange(a-x,b-x). Applying this to x=a-b gives 0 in symrange(b,2*b-a). The value 0 is included in the interval unless it stretches between two positive values or two negative values. This can be stated arithmetically as  "their product b*(2*b-a) is not positive.

Finally, take b*(2*b-a)&lt;=0, and rewrite to 2*b*b&lt;=a*b. A byte is saved by flipping &lt;= to &gt; and switching the cases.