Hasser the problem you are having is due to the fact that degrees dont follow conventional math, 360 = 0! WTH!
also 350 and 10 degrees are 20 degrees apart, your clock should NOT go off.
300 - 30 is 90 degrees apart.
im reviewing xots solution however i doubt it works for all situations (almost positive) because there arnt two ways to return information, there are TWO diffrences between every degree.
the diffrence between degree 0 and degree 90 is 90 and 270. theres the shortest angle and the longest angle (a reflex angle).
this is where your problem is coming from.
I have some psudocode somewhere on my computer, but i cant seem to find it friend. But ill find and post it later.
edit: OH WAIT, i see what xot's doing. nevermind that will work.
This post has been edited by Qjet: 21 January 2007 - 09:24 PM