How do I rotate an arrow to point at a movieclip?

I need to:

a) Gradually rotate an arrow to point towards a moveclip (this is simple)
and
b) Have it to take the shorter path (either clockwise or counter-clockwise depending on the situation). (can’t figure this out)

Can I get some help with the math and/or pseudo-code?

Thanks!