public double angle(int hour, int min){
        double hourAngle = (hour%12)*360/12 + ((double)min/60)*(360/12);
        double minAngle = min*360/60;
        
        double angleDiff = Math.abs(hourAngle - minAngle);
        return angleDiff < 360 - angleDiff ? angleDiff : 360 - angleDiff;
    }
Find small angle between hour and minute hand in analog clock
src/com/interview/misc/AngleBetweenHourAndMinuteHand.java