[Question]
  [
This is a simple challenge: given `n` in any way practical (Function arg, stdin, file, constant in code) output the **internal angles** 
(NOT the sum of the internal angles, just one) of a regular polygon with `n` sides. The output can be in degrees, gradians or radians, and can be displayed in any way practical (Function return, stdout, stderr if you feel like it, file etc)
As usual, smallest byte count wins.
  
[Answer]
# [Perl 6](https://github.com/nxadm/rakudo-pkg), 8 bytes
```
π- τ/*
```
[Try it online!](https://tio.run/##K0gtyjH7n1upoJamYPv/fIOuwvkWfa3/1lzFiZUKaRoq8ZoKaflFCsZ6ehbW/wE "Perl 6 – Try It Online")
Output in radians. Simple function in WhateverCode notation which computes \$π-τ/n\$. \$τ\$ is the [constant *tau*](https://en.wikipedia.org/wiki/Turn_(angle)#Tau_proposals) equaling \$2π\$.
[Answer]
# [Python 3](https://docs.python.org/3/), 18 bytes
```
lambda s:180-360/s
```
An unnamed function which returns a floating point number of degrees. (For gradians swap `180` for `200` and `360` for `400`.)
**[Try it online!](https://tio.run/##Jcs9CoAgGADQuU7xbSn0o0kRQp6kxShLKA11iejsFrW95R1nWK1hUfVD3OQ@ThI8px0pWEsqH5V14PU0e9AGnDTLjFgONcU8TQ6nTUDZRbhgNxQCLspFc2flm3YZ0PdyUD8wxvEB "Python 3 – Try It Online")**
[Answer]
# JavaScript, 12 bytes
```
n=>180-360/n
```
[Try it Online!](https://tio.run/##y0osSyxOLsosKNHNy09J/Z9m@z/P1s7QwkDX2MxAP@9/cn5ecX5Oql5OfrpGmoaFpuZ/AA)
[Answer]
# Shakespeare Programming Language, 242 226 203 bytes
[Try it online!](https://tio.run/##RU67DsIwEPuV@4AqC1u3DgxICJCYEOqQpgcJjyRNLir9@nBXBgafbMu2LsdXrQfVPfSnUadino3qDMGuVWeDHoVct54wgURA@xEk1Ytq9y4TeqBAdlGXUMBlIIswlUAOPcGANCMT9mIKY@HlcBOVy5vZwhUNg7tDZNDsDK79PBWdUKJ/ay38wgKjiatyeUQdI79hUSeqdfMF)
(Whitespace added for readability only)
```
N.Ajax,.Puck,.Act I:.Scene I:.[Enter Ajax and Puck]
Ajax:Listen tothy.
You is the quotient betweenthe product ofthe sum ofyou a big pig twice the square oftwice the sum ofa big big cat a cat you.
Open heart
```
Explanation: I use the formula ((n-2)200)/n. Input in STDIN. Much of this program is the number 200, which I represent as 2\*2\*2\*(1+2\*2\*2\*(2+1)). Saved 16 bytes by switching to gradians, since 180 is harder to represent than 200. Saved 23 bytes by instead representing 200 as 2\*(2\*(4+1))^2.
[Answer]
# [MathGolf](https://github.com/maxbergmark/mathgolf/blob/master/math_golf.txt), ~~6~~ ~~5~~ 4 [bytes](https://github.com/maxbergmark/mathgolf/blob/master/code_page.py)
```
⌡π*╠
```
-1 byte thanks to *@someone* nu outputting in gradians instead of degrees.  
Another -1 byte by outputting in radians instead.
[Try it online.](https://tio.run/##y00syUjPz0n7//9Rz8LzDVqPpi74/9@Yy4TLlMuMy5zLgsuSy9AAAA)
Outputs in radians by using the formula: \$A(n) = \frac{(n−2)×\pi}{n}\$.
**Explanation:**
```
⌡     # Decrease the (implicit) float input by 2
 π*   # Multiply it by PI
   ╠  # Then divide it by the (implicit) input (b/a builtin)
      # (after which the entire stack joined together is output implicitly as result)
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), 6 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
ÍƵΔ*I/
```
[Try it online](https://tio.run/##yy9OTMpM/f//cO@xreemaHnq//9vBgA) or [verify some more test cases](https://tio.run/##yy9OTMpM/W98senojrJKeyUFXTsFJfvK/4d7j209N0WrUv@/zn8A) (output in degrees).
**Explanation:**
Uses the [formula](https://www.mathsisfun.com/geometry/interior-angles-polygons.html) \$A(n) = \frac{(n-2)×X}{n}\$ where \$n\$ is the amount of sides, and \$A(n)\$ is the interior angle of each corner, and \$X\$ is a variable depending on whether we want to output in degrees (\$180\$), radians (\$\pi\$), or gradians (\$200\$).
```
Í       # Decrease the (implicit) input by 2
 ƵΔ*    # Multiply it by the compressed integer 180 (degrees output)
 žq*    # Multiply it by the builtin PI (radians output)
 т·*    # Multiply it by 100 doubled to 200 (gradians output)
    I/  # Divide it by the input
        # (after which the result is output implicitly)
```
[See this 05AB1E tip of mine (section *How to compress large integers?*)](https://codegolf.stackexchange.com/a/166851/52210) to understand why `ƵΔ` is `180`.
[Answer]
# WDC 65816 machine code, 20 bytes
Hexdump:
```
00000000: a2ff ffa9 6801 e838 e500 b0fa 8600 a9b5  ....h..8........
00000010: 00e5 0060
```
Assembly:
```
    ; do 360/n (using repeated subtraction... it'll go for at most 120 loops anyways, with sane inputs)
    LDX #$FFFF
    LDA.w #360
loop:
    INX
    SEC
    SBC $00
    BCS loop
; quotinent in X now. do 180-X
    STX $00
    LDA.w #181 ; carry is clear here, so compensate by incrementing accumulator
    SBC $00
    RTS
```
Input in $00, output in A. Overwrites $00 and X. 16-bit A/X/Y on entry (REP #$30).
Apparently I'm the only one using \$ 180 - \frac{360}{n} \$ instead of the more conventional formula. Note that this code rounds the division downwards, and thus rounds the result upwards.
[Answer]
# [Japt](https://github.com/ETHproductions/japt), ~~8~~ 7 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
```
Í*-#´/U
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=zSotI7QvVQ&input=OA)
```
Í*-#´/U     :Implicit input of integer U
Í           :Subtract from 2
 *          :Multiply by
  -#´       :-180
     /U     :Divided by U
```
Taking a page out of Kevin's book, see [this Japt tip](https://codegolf.stackexchange.com/a/121263/58974) to find out why `#´ = 180`.
[Answer]
# [APL (Dyalog Unicode)](https://www.dyalog.com/), 6 bytes
```
○1-2÷⊢
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT///qG9qQMCjtgnGJlxAplsQkGloZGH@/9H0bkNdo8PbH3Ut@p8GFHzU2weU9/R/1NV8aL3xo7aJQF5wkDOQDPHwDP6fDtJnYaBrbGYA1sP1qGO5vkaa7aOOGSCTLECivSvSNQ@tMNJ@1LvZxELhUe9chTSFzGKFzDyFosSUzMS8Yh2FdKhASmp6UWpqMQA "APL (Dyalog Unicode) – Try It Online")
The result is in radians. It implements `pi * (1 - 2 / x)`. The big circle is the "pi times" function.
[Answer]
# [R](https://www.r-project.org/), ~~21~~ ~~20~~ 14 bytes
-7 thanks to Robin Ryder. Outputs in radians
```
pi-2*pi/scan()
```
[Try it online!](https://tio.run/##K/r/vyBT10irIFO/ODkxT0Pzv/F/AA "R – Try It Online")
[Answer]
# [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), 9 bytes
```
Pi-2Pi/#&
```
[Try it online!](https://tio.run/##y00syUjNTSzJTE78n2b7PyBT1yggU19Z7X9AUWZeSbSyrl2ag3Ksmr5DUGJeemq0sY6hQex/AA "Wolfram Language (Mathematica) – Try It Online")
Returns the angle, in radians.
[Answer]
# [Python 3](https://docs.python.org/3/), 20 bytes
```
lambda n:(n-2)*180/n
```
[Try it online!](https://tio.run/##K6gsycjPM/6fpmCrEPM/JzE3KSVRIc9KI0/XSFPL0MJAP@9/QVFmXolGmgaIzMwrKC3R0ASC/4YGAA "Python 3 – Try It Online")
[Answer]
# [C (gcc)](https://gcc.gnu.org/), 18 bytes
```
z(n){n=180-360/n;}
```
[Try it online!](https://tio.run/##S9ZNT07@/79KI0@zOs/W0MJA19jMQD/PuvZ/Zl6JQm5iZp6GJlc1lwIQgATyrMHM4uTEvDQNJdUUJR0FtTxNiGBBEVAFTBRkIFS8KLWktChPwcCaq/a/oSkA "C (gcc) – Try It Online")
---
The above has accuracy issues on some inputs, below does not within the constraints of a float. The same could be said about slightly longer code which uses doubles... it's data types of ever increasing width all the way down.
# [C (gcc)](https://gcc.gnu.org/), 30 bytes
```
float z(float n){n=180-360/n;}
```
[Try it online!](https://tio.run/##S9ZNT07@/z8tJz@xRKFKA0LnaVbn2RpaGOgamxno51nX/s/MK1HITczM09DkquZSAAKQQJ41mFmcnJiXpqGkmqKko6CWpwkRLCgCqgCJpgFFqzTyNKHiRaklpUV5CgbWXLX/DY0B "C (gcc) – Try It Online")
[Answer]
# [APL (Dyalog Unicode)](https://www.dyalog.com/), ~~11~~ 9 bytes
```
180-360÷⊢
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT///qG9qQMCjtgnGJlxAplsQkGloZGH@39DCQNfYzODw9kddi/6nAUUf9fYBFXj6P@pqPrTe@FHbRCAvOMgZSIZ4eAb/13jUu8pI@1HvZhMLTR0gO@3QCigXAA "APL (Dyalog Unicode) – Try It Online")
Train that returns the value of each angle in degrees. Shaved a couple bytes off by switching to a smaller formula.
[Answer]
# Excel, 11 bytes
```
=180-360/A1
```
Result in Degrees.
For Degrees (and Gradians), 3 bytes can be saved by simplifying `=(A1-2)*180/A1`.
The Radians version though remains the same length:
`=(A1-2)*PI()/A1`
vs
`=PI()-2*PI()/A1`. Shortest Radians answer is 14 bytes: `=(1-2/A1)*PI()`
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 6 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
_2÷×ØP
```
A monadic Link accepting an integer which outputs a float.
**[Try it online!](https://tio.run/##y0rNyan8/z/e6PD2w9MPzwj4//@/MQA "Jelly – Try It Online")**
### How?
```
_2÷×ØP - Link: integer, sides
 2     - literal two
_      - (sides) subtract
  ÷    - divided by (sides)
    ØP - literal pi (well, a float representation of it)
   ×   - multiply
```
[Answer]
# [Cubix](https://github.com/ETHproductions/cubix), 31 bytes
```
U;o;[[email protected]](/cdn-cgi/l/email-protection)'´*p,O;%u//'O;oS@!
```
[Try it online!](https://tio.run/##Sy5Nyqz4/z/UOt/a30FPT8/TSFf90BatAh1/a9VSfX11f@v8YAfF//@NDAE "Cubix – Try It Online")
Outputs degrees as a integer and a fraction (if needed). This was interesting to do as, there is no floats in Cubix. I hope the output format is OK for the challenge.
Wrapped onto a cube
```
      U ; o
      ; O @
      . . .
I 2 - ' ´ * p , O ; % u
/ / ' O ; o S @ ! . . .
. . . . . . . . . . . .
      . . .
      . . .
      . . .
```
[Watch It Run](https://ethproductions.github.io/cubix/?code=VTtvO09ALi4uSTItJ7QqcCxPOyV1Ly8nTztvU0Ah&input=MTE=&speed=20)
* `I2-'´*` Get n input, take away 2, push 180 and multiply
* `p,O;` Bring initial input to the TOS, integer divide, output integer and pop
* `%u!` Do modulo, u-Turn to the right, test for 0
	+ `@` if zero halt
* `So;O` push 32 (space) onto stack, output as char and pop. Output modulo result
* `'//` push / to stack and reflect around the cube. This will end up on the top face after jumping an output
* `o;U;O@` output the `/`, pop, u-Turn to the left, pop and output the input
[Answer]
# [R](https://www.r-project.org/), 18 bytes
Hardly a new answer, but since I cannot comment I'll post it anyway.
Output is in radians.
```
n=scan();pi-2*pi/n
```
[Try it online!](https://tio.run/##K/r/P8@2ODkxT0PTuiBT10irIFM/778xlwmXKZcZlzmXBZcll6HBfwA "R – Try It Online")
[Answer]
# [Retina 0.8.2](https://github.com/m-ender/retina/wiki/The-Language/a950ad7d925ec9316e3e2fb2cf5d49fd15d23e3d), ~~44~~ ~~42~~ 39 bytes
[crossed out 44 is still regular 44](https://codegolf.stackexchange.com/a/185093/20080)
```
.+
$*
^11
$' $&
\G1
180$*
(?=1+ (1+))\1
```
[Try it online!](https://tio.run/##K0otycxL/P9fT5tLRYsrztCQS0VdQUWNK8bdkMvQwgAopmFva6itoGGorakZY/j/vykA "Retina 0.8.2 – Try It Online") Explanation:
```
.+
$*
```
Convert to unary.
```
^11
$' $&
```
Make a copy that is two less than the input.
```
\G1
180$*
```
Multiply that copy by 180.
```
(?=1+ (1+))\1
```
Divide by the original input and convert to decimal.
In Retina 1 you would obviously replace the `$*` with `*` and hence the `1` with `_` but you could then save a further 5 bytes by replacing the middle two stages with this stage:
```
^__
180*$' $&
```
[Answer]
# [Bash](https://www.gnu.org/software/bash/), 21 bytes
Same answer as everyone else, but in Bash :)
```
echo $[($1-2)*180/$1]
```
[Try it online!](https://tio.run/##S0oszvj/PzU5I19BJVpDxVDXSFPL0MJAX8Uw9v///@YA "Bash – Try It Online")
[Answer]
# [PHP](https://php.net/) (7.4), ~~21~~ 18 bytes
-3 bytes thanks to [Jonathan Allan](https://codegolf.stackexchange.com/users/53748/jonathan-allan).
```
fn($n)=>180-360/$n
```
[Try it online!](https://tio.run/##K8go@G9jX5BRwMWlkmb7Py1PQyVP09bO0MJA19jMQF8l7781F1dafpGChkqmgq2CibUCkLaxVTA0ALG0tTUVqrkUgCA1OSNfQSUNqEpTQU9BKSZPyZqr9r/5v/yCksz8vOL/um4A "PHP – Try It Online")
[Answer]
# [J](http://jsoftware.com/), 9 bytes
```
%~180*-&2
```
[Try it online!](https://tio.run/##y/qfVmyrp2CgYKVg8F@1ztDCQEtXzei/JpeSnoJ6mq2euoKOQq2VQloxF1dqcka@QpqCsXamnsV/AA "J – Try It Online")
or 
# [J](http://jsoftware.com/), 9 bytes
```
180-360%]
```
[Try it online!](https://tio.run/##y/qfVmyrp2CgYKVg8N/QwkDX2MxANfa/JpeSnoJ6mq2euoKOQq2VQloxF1dqcka@QpqCsXamnsV/AA "J – Try It Online")
# [K (oK)](https://github.com/JohnEarnest/ok), 8 bytes
```
180-360%
```
[Try it online!](https://tio.run/##y9bNz/7/P83K0MJA19jMQPV/mrqxtqL5fwA "K (oK) – Try It Online")
[Answer]
# [J](http://jsoftware.com/), 8 bytes
```
%o.@*-&2
```
[Try it online!](https://tio.run/##y/qfVmyrp2CgYKVg8F81X89BS1fN6L8ml5KegnqarZ66go5CrZVCWjEXV2pyRr5CmoKxdqaehYKfk55CbmJJckZqsUJ5ZkmGgmOAj0J@Xup/AA "J – Try It Online")
Implements `pi * (x - 2) / x`. Just like [APL](https://codegolf.stackexchange.com/a/194739/78410), J has the "Pi times" built-in `o.`.
### How it works
```
%o.@*-&2
     -&2  x - 2
%   *-&2  (1/x) * (x - 2)
 o.@      Pi times the above
```
[Answer]
# [Forth (gforth)](http://www.complang.tuwien.ac.at/forth/gforth/Docs-html/), 25 bytes
```
: f 180e 360e s>f f/ f- ;
```
[Try it online!](https://tio.run/##FY3NCsMgGATvfYohd21@SikN8UXEU/VrAmkVTZ/fmssO7LCsxHys6i0nan0iDI8@MN1bFCPIFVHMzSTE/xJDQD7RI/3C1rwpaMJeWq051vBlvow3JqyPDrs5ztWIzugOlKFrJ4lXxu4xJlf/ "Forth (gforth) – Try It Online")
Output is in degrees
### Code Explanation
```
: f          \ start a new word definition
  180e       \ put 180 on the floating point stack
  360e       \ put 360 on the floating point stack
  s>f f/     \ move n to the floating point stack and divide 360 by n
  f-         \ subtract result from 180
;            \ end word definition  
```
[Answer]
# [Zsh](https://www.zsh.org/), 17 bytes
```
<<<$[180-360./$1]
```
[Try it online!](https://tio.run/##qyrO@P/fxsZGJdrQwkDX2MxAT1/FMPb////mAA "Zsh – Try It Online")
---
[Pending consensus,](https://codegolf.meta.stackexchange.com/questions/18212/zsh-functions-and-math-functions) the following may be a valid **15 byte** solution, or more likely a **17 byte** tie with `()` declaring it a function:
```
((180-360./$1))
```
[Try it online!](https://tio.run/##DcE9CoAwDAbQvaf4hg7JYLUUpOAZPIUa2iUBfxbFs1ffu4/ShLgRxTx0aRxC7yNzk0uXs5oe6GaIc2I7FFXxpBDyO2E1h9@2FIMngpAymN1qurUP "Zsh – Try It Online")
[Answer]
# [Runic Enchantments](https://github.com/Draco18s/RunicEnchantments/tree/Console), 8 bytes
```
PPi2,,-@
```
[Try it online!](https://tio.run/##KyrNy0z@/z8gINNIR0fX4f9/YwA "Runic Enchantments – Try It Online")
Output is in radians.
### Explanation
```
P           Push Pi
 P          Push Pi
  i         Read input
   2        Push 2
    ,       Divide
     ,      Divide
      -     Subtract
       @    Output and terminate
```
Works out to `Pi-(Pi/(i/2))` which is equivalent to `Pi-(2Pi/i)` (`PP2*i,-@`, same length), I just liked the "push all the parts, then do all the math" arrangement ("it looked prettier").
[Answer]
# [SimpleTemplate](https://github.com/ismael-miguel/SimpleTemplate), 37 bytes
Just uses the simple formule `180-360/n` used on other answers.  
Due to ... sub-optimal ... math support, the formule was adapted to `(-360/$n)+180` (it's almost the same, calculated in a different order).
```
{@set/A-360 argv}{@incby180A}{@echoA}
```
You can try it on: <http://sandbox.onlinephpfunctions.com/code/00b314dee3c10139928928d124be9fc1c59ef4bf>  
On line 918, you can change between `golfed`, `ungolfed` and `fn`, to try the variants below.
**Ungolfed:**
```
{@set/ A -360 argv}
{@inc by 180 A}
{@echo A}
```
Yeah, there's not much to ungolf...
**Explanation:**
* `{@set/ A -360 argv}` - Stores in `A` the result of `-360/argv`.  
`argv` is a variable that holds all passed arguments (in a function or when running the code).  
`A` is now an array with `argc` elements (`argc` holds the number of aguments passed).
* `{@inc by 180 A}` - Increments all values of `A` by 180 (`A+180`, basically)
* `{@echo A}` - Outputs the values of A, without delimiter.  
One could use `{@return A}` if inside a function, to get an usable array.
**Function alternative:**
Converting to a function to get an usable array is easy:
```
{@fn N}
    {@set/ A -360 argv}
    {@inc by 180 A}
    {@return A}
{@/}
```
Creates a function `N` that takes multiple arguments and returns an array.
Just call it as `{@call N into <variable> <argument, arguments...>}`.
---
If you are curious, this code compiles to the following:
```
// {@set/A-360 argv}
$DATA['A'] = array_map(function($value)use(&$DATA){return (-360 / $value);}, $FN['array_flat']((isset($DATA['argv'])?$DATA['argv']:null)));
// {@incby180A}
$DATA['A'] = $FN['inc'](isset($DATA['A'])?$DATA['A']:0, 180);
// {@echoA}
echo implode('', $FN['array_flat']((isset($DATA['A'])?$DATA['A']:null)));
```
]