Function to distance between the endpoints of the hour and minute hand
function distanceEndpoints ( a , b , c ) { var angle = cal_cos ( c ) ; return Math . sqrt ( ( a * a ) + ( b * b ) - 2 * a * b * angle ) ; }