<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 get_hour_hand_points_to(self, hour, minutes):
        return hour + minutes / 60

    def get_minute_hand_points_to(self, minutes):
        return minutes / 5

    def get_clockwise_angle(self, hand1, hand2):
        one_hour_to_degree = 360/12

        return abs(hand1 - hand2) * one_hour_to_degree

    def get_min_angle(self, hand1, hand2):
        clockwise_angle = self.get_clockwise_angle(hand1, hand2)
        counter_clockwise_angle = 360 - clockwise_angle

        return min(clockwise_angle, counter_clockwise_angle)

    def angleClock(self, hour: int, minutes: int) -> float:
        hour = hour % 12

        hour_hands_points_to = self.get_hour_hand_points_to(hour, minutes)
        minute_hands_points_to = self.get_minute_hand_points_to(minutes)

        return self.get_min_angle(hour_hands_points_to, minute_hands_points_to)
42