mchulet
I just grabbed a random clock face from a google search and then made the hands smaller so they fit on it.
Yes, you can calculate any angle you need from a given time, or check the time from an angle. So, if the time is 8:50, then the angle for the hour hand will be 8 x 30 + 270, and the angle for the minute hand will be 50 x 6 + 270.
the general formula from a given time is:
number of minutes x (360 / 60) + 270
number of hours x (360 / 12) + 270
or if the hands have been set, and you want to know what time they were set to:
hour: round(((clockarmhour.Angle+90) / 30)%12)
minute: round(((clockarmminute.Angle+90) / 6)%60)
seconds: round(((Sprite.Angle+90) / 6)%60)
(We have to add 90 degrees to get the angle back to what C2 understands - since we added 270 earlier. If we subtract the 270 out, then we get negative numbers that are slightly harder to deal with. At the end we have %12 or MODULO 12 to keep the hours between 0 and 12. The minutes and seconds have %60 to keep those numbers between 0 and 60)