I am trying to determine if one degree on a circle is closer to the right or the left of another degree on a circle.

For example, if I have a heading of 350 degrees and another heading of 10 degrees, then I need to be able to determine that 10 degrees is to the right of 350 degrees on a circle (because it's only 20 degrees from the right -- as opposed to 340 degrees from the left).

How could this be accomplished?