<p>Given two numbers, <code>hour</code> and <code>minutes</code>, return <em>the smaller angle (in degrees) formed between the </em><code>hour</code><em> and the </em><code>minute</code><em> hand</em>.</p>

<p>Answers within <code>10<sup>-5</sup></code> of the actual value will be accepted as correct.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2019/12/26/sample_1_1673.png" style="width: 300px; height: 296px;" />
<pre>
<strong>Input:</strong> hour = 12, minutes = 30
<strong>Output:</strong> 165
</pre>

<p><strong class="example">Example 2:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2019/12/26/sample_2_1673.png" style="width: 300px; height: 301px;" />
<pre>
<strong>Input:</strong> hour = 3, minutes = 30
<strong>Output:</strong> 75
</pre>

<p><strong class="example">Example 3:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2019/12/26/sample_3_1673.png" style="width: 300px; height: 301px;" />
<pre>
<strong>Input:</strong> hour = 3, minutes = 15
<strong>Output:</strong> 7.5
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= hour &lt;= 12</code></li>
	<li><code>0 &lt;= minutes &lt;= 59</code></li>
</ul>

class Solution:
    def angleClock(self, hour: int, minutes: int) -> float:
        hourOffset = 0
        if hour != 12 and hour != 0:
            hourOffset = hour*30
        
        hourAngle = hourOffset + (minutes/60)*30 
        minAngle = (minutes/5)*30

        angleDiff = abs(minAngle - hourAngle)

        if angleDiff > 180:
            return 360 - angleDiff
        return angleDiff
"""
Hour hand will move forward between
curr hour and curr hour + 1 based on the minutes.

minutes / 60 == the percentage of movement for the hour hand


We can normalise minutes by minutes = minutes / 5


Num degrees between hours = 360 / 12 = 30

Hour hand is (minutes/60)*30 degrees.
Min hand is (minutes/5)*30 degrees



"""
22