[Question]
  [
An analog clock has 2 hands\*: Hour and minute.  
These hands circle the clock's face as time goes by. Each full rotation of the minute hand results in 1/12th of a rotation of the hour hand. 2 full rotations of the hour hand signifies a full day.
As these hands are fixed to the same central point, and rotate around that point, you can always calculate the angle between the hands. In fact there are 2 angles at any given time; A larger one, and a smaller one (sometimes they will both equal 180, but that's not important)
*\*Our hypothetical clocks don't have second hands*
## Task
Given a time in 24 hour format, output the smaller angle between the hands, in degrees. If the hands are directly opposite eachother (such as at `6:00`, `18:00` etc) output 180
## Rules
Input may be taken as:
 - A delimiter separated string: `6:32`, `14.26`
 - 2 separate values, strings or ints: `6, 32`, `14, 26`
 - An array of 2 values, strings or ints: `[6, 32]`, `[14, 26]`
You may also optionally specify that your answer requires inputs be padded to 2 digits (assuming you take strings), ie: `06:32`, `06, 32`, `[06, 32]`
You may also optionally reverse the order of the inputs, taking minute then hour, ie: `32:6`, `32, 6`, `[26, 14]`
Hour will be an integer value between `0` and `23` (inclusive)
Minute will be an integer value between `0` and `59` (inclusive)
You can assume that the minute hand snaps to increments of 6 degrees along the face (one evenly-spaced position for each minute value)  
You can assume that the hour hand snaps to increments of 0.5 degrees along the face (one evenly-spaced position for each minute value per hour value)
Output must be given in degrees, not radians. You may include a trailing `.0` for whole numbers
## Scoring
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'") so fewest bytes *in each language* wins!
## Testcases
```
Input: 06:32
Output: 4
Input: 06:30
Output: 15
Input: 18:32
Output: 4
Input: 06:01
Output: 174.5
Input: 00:00
Output: 0
Input: 00:01
Output: 5.5
Input: 12:30
Output: 165
Input: 6:00
Output: 180
Input: 23:59
Output: 5.5
```
  
[Answer]
# JavaScript (ES6), ~~41 40~~ 39 bytes
Takes inputs as `(h)(m)`.
```
h=>m=>((x=4+h/3-m*.55/9)&2?12-x:x)%4*90
```
[Try it online!](https://tio.run/##jc9LDoIwEIDhvafoRtPB9EmLYFLceQ/CQzBAjRDT29e4bbtwMbsv/8w8m0@zte/ptZPVdr0fjB9NvZgaY2fUeWQ5WTKqNavgJG9CEnd1cFRZxX1r183OPZ3tAw8YFYBzCXS398n1HRYAiDGkDgnGIyZ04ET5dw6JOHdRNCwiDr8JKU@xuKijnpDpTwqdujEBy3C1zAHrKrXafwE "JavaScript (Node.js) – Try It Online")
### How?
Instead of working directly in the range \$[0..360]\$, we define a temporary variable \$x\$ in the range \$[0..4]\$:
$$x=\left|\frac{4h}{12}+\frac{4m}{60\times12}-\frac{4m}{60}\right|\bmod 4$$
$$x=\left|\frac{4h}{12}-\frac{44m}{60\times12}\right|\bmod 4$$
$$x=\left|\frac{h}{3}-\frac{11m}{180}\right|\bmod 4$$
The angle in degrees is given by:
$$\min(4-x,x)\times90$$
However, the formula is implemented a bit differently in the JS code, as we definitely want to avoid using the lengthy `Math.abs()` and `Math.min()`.
Instead of computing the absolute value, we force a positive value in \$[0..12]\$ by computing:
$$x'=4+\frac{h}{3}-\frac{11m}{180}$$
And instead of computing the minimum, we determine in which case we are by simply doing a bitwise AND with \$2\$ -- and this is why we chose an interval bounded by a power of \$2\$ in the first place.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), ~~14~~ 12 bytes
```
×“<¿‘Iæ%Ø°AH
```
[Try it online!](https://tio.run/##AUwAs/9qZWxsef//w5figJw8wr/igJhJw6Ylw5jCsEFI/0RVK8OYMFVq4oCdOjvigJwgLT4g4oCdO8OHCjI0LDYw4bi2xZJww4figqxZ//// "Jelly – Try It Online")
A monadic link which takes the time as a list of two integers: hour, minute. 
Thanks to @JonathanAllan for saving 2 bytes!
### Explanation
```
×“<¿‘        | Multiply hour by by 60 and minute by 11
     I       | Find difference
      æ%Ø°   | Symmetric mod 360 [equivalent to (x + 360) mod 720 - 360]
          A  | Absolute
           H | Half
```
[Answer]
# [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), ~~30~~ ~~29~~ 28 bytes
```
5Abs@Mod[#.{6,-1.1},72,-36]&
```
[Try it online!](https://tio.run/##y00syUjNTSzJTE78n6Zg@9/UManYwTc/JVpZr9pMR9dQz7BWx9xIR9fYLFbtf0BRZl6Jg1aagr6DQjVQWsHYqFZHAcwwADEMLZCEDEG0gY6CAZQG8w2NYGrNoDJGxjoKppa1tf8B "Wolfram Language (Mathematica) – Try It Online")
ungolfed version:
```
Abs[Mod[#.{30,-5.5}, 360, -180]] &
```
The argument of the function is `# = {h,m}` containing the hour and the minute. This length-two list is interpreted as a vector and the dot-product with `{30,-5.5}` is calculated: `#.{30,-5.5} = 30*h-5.5*m`. Then we calculate the symmetric modulus of 360 with `Mod[#.{30,-5.5}, 360, -180]` giving an angle in the interval -180..+180. `Abs` takes the absolute value thereof.
As all involved operators are linear, we can multiply and divide all appearing numbers however they are most convenient. By pulling a factor of `5` out of the expression and dividing all numbers in the expression by 5, the byte-count is minimized. 
[Answer]
# MATL, 18 bytes
```
30*i5.5*-t360-|hX<
```
Accepts two inputs of hours followed by minutes. Uses the same method as [this answer](https://codegolf.stackexchange.com/a/187248/51939)
Try it at [MATL Online](https://matl.io/?code=30%2ai5.5%2a-t360-%7ChX%3C&inputs=12%0A30&version=20.11.0)
**Explanation**
```
      % Implicitly grab first input (hours)
30*   % Multiply by 30
i     % Explicitly grab second input (minutes)
5.5*  % Multiply by 5.5
-     % Take the difference
t     % Duplicate the result
360-  % Subtract 360
|     % Take the absolute value
h     % Horizontally concatenate
X<    % Determine the minimum value
      % Implicitly display the result
```
[Answer]
# [Alchemist](https://github.com/bforte/Alchemist), 134 bytes
```
_->In_h+In_m+720d+360a+f
h->60d
m+11d->
0m+d+a+0r->b
0a+0x->r
d+b+r->r+a
r+0b->
b+0d+0h+0y->5y
b+0d+5y->x
0b+0d+f->Out_x+Out_"."+Out_y
```
[Try it online!](https://tio.run/##JYw7DsIwEET7PUba0aJNooRueyqOYNmYyEiYwgTJPr1ZQjM/PY1/3tI9P95774718nIJJhnnSSLmVTw2SqyrRMoYx8hKkhHhIYU1kAFSWQtFBNhS4KlAgnEBdiEJ0liX9q@L5Upy5I31@tldxU@H03B4632aSeQL "Alchemist – Try It Online")
## Explanation
```
_->In_h+In_m+720d+360a+f
```
Initial setup. Inputs hours and minutes into `h` and `m`, sets current angle `d` to 360 degrees (720 half-degrees), sets up `a` to compute the principal angle, and sets the output flag.
```
h->60d
m+11d->
```
Each hour adds 30 degrees, and each minute subtracts 5.5 degrees.
```
0m+d+a+0r->b
0a+0x->r
```
While the `r` (reverse) flag is not set, each `d` atom should move one `a` atom to `b`. This occurs after the minutes are all used up, to avoid a "race condition". When there are no `a` atoms remaining, set `r` to reverse this flow.
Note that this second rule can trigger multiple times, and can even trigger before the initial setup rule. This does not harm anything, so there's no need to prevent this. The `0x` condition handles an edge case: when the input is 6:00, there are no `a` atoms when the program terminates, but there are `x` atoms if the final result is at least 1 degree.
```
d+b+r->r+a
r+0b->
```
The reverse: when the signed angle is greater than 180 degrees, move `b` atoms to `a` to decrease the angle to output. Stop reversing when the angle reaches "360".
```
b+0d+0h+0y->5y
b+0d+5y->x
```
When all of the degree atoms are used up, divide by 2 to get the angle to output.
```
0b+0d+f->Out_x+Out_"."+Out_y
```
After this is done, output exactly once using the `f` flag from the initial setup.
[Answer]
# [Python 3.8 (pre-release)](https://docs.python.org/3.8/), ~~45~~ 43 bytes
-2 bytes thanks to [Erik](https://codegolf.stackexchange.com/users/41024/erik-the-outgolfer).
```
lambda h,m:min(x:=abs(h%12*30-m*5.5),360-x)
```
[Try it online!](https://tio.run/##TY3dCoIwGIbPu4oPIdjkW@wHhw3sRqoDJcaENod5YIjXvpoYdPS8f/DG9@SGoOo4Jtvc0rP13aMFh974PpDZNG33Iu4oZKk482V1qigqzdlMkx3GPIQ@wJVoBCUpwiZ4FqL@i0QmR@A7Ny/kb6v3RiqE6kzv5gAQxz5MxBaLM1yuZvEZwC6wWPK9pWtB0wc "Python 3.8 (pre-release) – Try It Online")
`h%12` - hour in 12-hour format  
`h%12*30` - angle of hour hand at the full hour  
`m/2` - angle the hour hand moved in `m` minutes  
`h%12*30+m/2` - current position of the hour hand as an angle  
`m*6` - angle of the minute hand (`360°/60 = 6°`)
[Answer]
# [Stax](https://github.com/tomtheisen/stax), 15 [bytes](https://github.com/tomtheisen/stax/blob/master/docs/packed.md#packed-stax)
```
Ç╢e╛╦¡uøßmì♪║└├
```
[Run and debug it](https://staxlang.xyz/#p=80b665becbad7500e16d8d0dbac0c3&i=[06,+32]%0A[06,+30]%0A[18,+32]%0A[06,+01]%0A[00,+00]%0A[00,+01]%0A[12,+30]%0A[06,+00]%0A[23,+59]&a=1&m=2)
* `m =` number of minutes since midnight
* `d = 5.5 * m`
* The result is `min(d % 360, -d % 360)`.
[Answer]
# [C# (Visual C# Interactive Compiler)](http://www.mono-project.com/docs/about-mono/releases/5.0.0/#csc), ~~47~~ 45 bytes
```
h=>m=>(h=(360+h%12*30-m*5.5)%360)<180?h:360-h
```
[Try it online!](https://tio.run/##bY3BS8MwFMbP5q94FgbJtpakpWVmS70JA8GhBw@yQ@0yEmyz0SZ6EP/2uqRjqHh573vv99731X1c93q4c6Ze7Q7utZHzn3psZbkXgxJlK0qsBM4KOlMTlk4zGrfTPMnJ5LQiK7agt4qfZKyGJfpQupGA1ybZSPmGCVwLiBmBT3T1XnWgzdFZEPAoq929NhKT5Qj6Y6M9CAfJk59wxCOPtbGgDq7rA7bJpup6icPDC92SObTaOCv/w2zrDZ47bWVIi9benkMEszHpD35w9sL3OIQSfLYnv29P09dAC56lyFeK2OKsKUOUckpDZYilnhZ@kWY8v/kG "C# (Visual C# Interactive Compiler) – Try It Online")
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 22 bytes
```
Ｉ↔⁻¹⁸⁰﹪⁻×³⁰⁺⁶Ｎ×⁵·⁵Ｎ³⁶⁰
```
[Try it online!](https://tio.run/##S85ILErOT8z5/z@gKDOvRMM5sbhEwzGpWMM3M6@0WMPQwkBHwTc/pTQnHyoSkpmbWqxhDBQOyAFyzXQUPPMKSkv8SnOTUos0NDU1dRQgSkz1TLHIGZsZaIKA9f//hhYKxkb/dctyAA "Charcoal – Try It Online") Link is to verbose version of code. Takes input as two integers. Explanation:
```
             Ｎ          First input
           ⁺⁶           Plus literal 6
        ×³⁰             Multiplied by literal 30
       ⁻                Minus
                  Ｎ     Second input
              ×⁵·⁵      Multiplied by literal 5.5
      ﹪            ³⁶⁰  Modulo literal 360
  ⁻¹⁸⁰                  Subtracted from literal 180
 ↔                      Absolute value
Ｉ                       Cast to string
                        Implicitly print
```
[Answer]
# [Perl 6](https://github.com/nxadm/rakudo-pkg), 28 bytes
```
((*/3-*/9*.55+2)%4-2).abs*90
```
[Try it online!](https://tio.run/##K0gtyjH7n1upoJamYPtfQ0NL31hXS99SS8/UVNtIU9VE10hTLzGpWMvS4L81V3FipUKaRo1KvKZCWn4Rl4aCmY6CsZGmDpRlAGIZWiCLKRiCWQZAlgGcBRYzNILpAKsDs4yMdRRMLTV1/gMA "Perl 6 – Try It Online")
Uses a few tricks stolen from other answers and calculates
```
r = abs((h/3 - m/9*0.55 + 2) % 4 - 2) * 90
  = abs((h*30 - m*5.5 + 180) % 360 - 180)
```
[Answer]
# [Python 3](https://docs.python.org/3/), 40 bytes
```
lambda h,m:180-abs(180-(h*30-m*5.5)%360)
```
[Try it online!](https://tio.run/##TY3dCsIgGIbPu4qPQaBD41OZLKFupDpwhDhIN7adhOzaLceCjp73D97xvfghquwu9/yyoXta8CwY0SK33UwKia8V8lA3p4YelUaa3TCVFfQRbkQzUJIy2AQWIdq/SBQiA9y5eSF/W703UjFozvRhDgDj1MeFuCp5g3I1KRQAv0Jy5HtL14rmDw "Python 3 – Try It Online")
`h*30` - angle between noon and the hour `h` when the minute is `0`; if the hour is equal or greater than 12, this angle can be equal or greater than 360°  
`m*6` - angle between noon and the minute hand  
`m*.5` - angle the hour hand moved forward from the full hour after `m` minutes (e.g: if it's 4:24, the hour hand moved forward 12 degrees from the position it was in at 4 o'clock)  
`h*30-m*5.5` - one of the two angles between the hour hand and the minute hand; the coefficient for `m` is `5.5` because `m*6-m*.5=m*5.5`; this is still not the answer because it can be a value greater than 360° (e.g: if `h,m=13,0`) or less than 0° (e.g: if `h,m=12,30`)  
`(h*30-m*5.5)%360` - this modulo takes into account the cases where the computed value above is not between 0 and 360°; this is still not the answer because it could be the ampler of the two angles, while we want the most narrow  
`180-abs(180-(h*30-m*5.5)%360)` - this is the final result; the general rule is that `x-abs(x-y)` is equivalent to `min(y,x-y)`, which would give the correct result
[Answer]
# [Tcl](http://tcl.tk/), ~~71~~ ~~74~~ ~~59~~ 54 bytes
```
{{h m {x (60*$h-$m*11)%720}} {expr min($x,720-$x)/2.}}
```
[Try it online!](https://tio.run/##ZY1RC4IwFIX/ykEWqGTdXVHrt1QPEYqBi5ELJmO/fUVPbj5@537nXPOYwtwbDLgG50YoOIu8pVKMlVCllMWuY/Ierrf6DfV85cLuf1ElbHHkg/dBf8yM7HLXelogBrSo@YaIac3ytBFIrplAlHB05xrNOVrk5EWTCJvCX8jCFw "Tcl – Try It Online")
saved 5 bytes by using a lambda expression
[Answer]
# Python 3, ~~58~~ 57 Bytes
-1/-2 Thanks to @Shaggy
```
h,m=eval(input())
x=(30*h-5.5*m)
print(abs(min(x,360-x)))
```
Naive implementation, takes input in the form of `[6,32]`. Some bytes can probably be shaved off the last line especially.
# Python 2, ~~52~~ 50 Bytes
```
h,m=input()
x=(30*h-5.5*m)
print abs(min(x,360-x))
```
[Answer]
# [Perl 5](https://www.perl.org/) `-MList::Util=min -p`, 37 bytes
```
$_=abs<>*5.5-$_%12*30;$_=min$_,360-$_
```
[Try it online!](https://tio.run/##K0gtyjH9/18l3jYxqdjGTstUz1RXJV7V0EjL2MAaKJqbmacSr2NsZgAU/f/f0ILL2OhffkFJZn5e8X9dX5/M4hIrq9CSzByQwv@6BTkA "Perl 5 – Try It Online")
Takes input as hours followed by minutes on a separate line because it saved a few bytes.
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), 16 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
60*+5.5*D(‚360%ß
```
Takes hours as first input, minutes as second.
[Try it online](https://tio.run/##yy9OTMpM/f/fzEBL21TPVMtF41HDLGMzA9XD84GCXMZGAA) or [verify all test cases](https://tio.run/##yy9OTMpM/V9Waa@k8KhtkoKSfaW61aGFCcX/zQy0tE31TLVcNB41zDI2M1A9PP@/zv9oJQMzK2MjJR0wbQCkDS3gfANDEG1gZWAApUF8QyOIOpA8iDYytjK1VIoFAA).
**Explanation:**
Basically implements the following formula:
$$t = (60h+m)×5.5$$
$$r = min(t\bmod360,-t\bmod360)$$
```
60*               # Multiply the (implicit) hours-input by 60
   +              # Add it to the (implicit) minutes-input
    5.5*          # Multiply it by 5.5
        D(‚       # Pair it with it's negative
           360%   # Take modulo-360 on both
               ß  # And then pop and push the minimum of the two
                  # (which is output implicitly as result)
```
[Answer]
# [R] , 45 bytes
```
 function(h,m)min(t=(60*h+m)*5.5%%360,-t%%360)
```
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 16 bytes
```
*FÑ aV*5½
mUa360
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=KkbRIGFWKjW9Cm1VYTM2MA&input=NgozMg)
```
*FÑ aV*5½     :Implicit input of integers U=h and V=m
*F            :Multiply U by 15
  Ñ           :Multiply by 2
    a         :Absolute difference with
     V*5½     :V multiplied by 5.5
mUa360        :Reassign to U
m             :Minimum of U and
 Ua360        :Absolute difference of U and 360
```
[Answer]
## [><>](https://esolangs.org/wiki/Fish), 17 bytes
```
b*$6a**-:0)12,-*n
```
[Try it online! (6:32)](https://tio.run/##S8sszvj/P0lLxSxRS0vXykDT0EhHVyvv////urpliTmlqf/N4CxjIwA "><> – Try It Online")
Takes input as h, m on the stack. 
### Explanation
```
b*$6a**-:0)12,-*n
b*                Multiplies m by 11
  $               Swaps m & h
   6a**           Multiplies h by 60
       -          Subtracts m & h (v)
        :0)       Checks if v > 0 (b=0/1)
           12,-   Subtracts .5 from b (-.5/.5)
               *  Multiplies v by b (halve & abs)
                n Outputs result
b*                Errors
```
[Answer]
## Pyret, 59 bytes
```
{(h,m):x=(30 * h) - (m * 5.5)
num-abs(num-min(x,360 - x))}
```
]