Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Creative category for Clock Angle by Hartrik
# Ha = (H + 100 / 60 * M / 100) * (360 / 12) => 30H + M/2
# Ma = M * (360 / 60) => 6M
# R1 = |Ha - Ma|
# R2 = 360 - R1
def clock_angle(time):
h, m = map(int, time.split(":"))
return min(abs(i - abs(30*((h, h-12)[h>12]) - 5.5*m)) for i in (360, 0))
Oct. 30, 2014