You're thinking linearly... stop it!

Degrees are a circular problem, with those you have to treat zero (ie zero degrees) as a centre-point and then 0-180 is treated as Positive, and 359-181 degrees are treated as -1 thru to -179. Ignore the fact that 'theoretically' PBP can't handle negatives... it can... if you're still stuck with the clue I've left you, come back and we'll progress the logic as there's a heap of ways to approach this...