Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Angle Between Hands of a Clock

var angleClock = function(hour, minutes) {
    
 const hour_degree = (30 * hour) + (minutes / 2)


	const minutes_degree = 6 * minutes


	const angle = Math.abs (hour_degree - minutes_degree)


	const result = Math.min(angle, 360 - angle)


	return result
    
    
};
 
PREVIOUS NEXT
Tagged: #Angle #Between #Hands #Clock
ADD COMMENT
Topic
Name
9+9 =