Opera Solutions dashboards may display timestamps that require precise analog-clock geometry. Given an hour and minute, calculate the smaller angle between the hour and minute hands.
The hour hand moves continuously as the minute hand advances. For example, at 3:30, the hour hand is halfway between 3 and 4, not exactly on 3.
Implement clock_angle(hour, minute), where hour is an integer from 1 through 12 and minute is an integer from 0 through 59. Return the smaller angle between the hands as a number of degrees in the inclusive range [0, 180]. Return .0 or .5 when appropriate.
The hour hand moves 30 degrees per hour and 0.5 degrees per minute. The minute hand moves 6 degrees per minute.
def clock_angle(hour, minute):