Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Percentages then diff then lesser angle solution in Clear category for Clock Angle by Phil15
def clock_angle(time):
h, mn = map(int, time.split(':'))
h, mn = (h%12 + mn/60)/12, mn/60 # progression percentage for both hands
abs_diff = abs(h - mn)
return 360 * min(abs_diff, 1 - abs_diff) # lesser angle
Oct. 12, 2018