If I want to convert from degrees to radians, I can use the function that takes degree value as an input, multiplies it with $\frac{\pi}{180}$ and returns the radian value: $\operatorname{DtoR}(d)=d \times \frac{\pi}{180}$.
And if I want to go from radians to degrees I need to only go backwards and divide radian value with $\frac{\pi}{180}$ (e.g. multiply it with $\frac{180}{\pi}$): $\operatorname{RtoD}(r)=r \times \frac{180}{\pi}$.
My question is this: Why does multiplying/dividing with $\frac{\pi}{180}$ converts degrees into radians/radians into degrees? Why exactly that number, not some other? Also, does this work only for unit circle, or for any circle?
Take a look at these ratios:
$\frac{180}{d}=\frac{\pi}{r}$
Where $d$ is the degrees and $r$ is radians. Knowing that $\pi$ radians is 180 degrees one can setup this ratio to find the values they're looking for.
Finding degrees: $d=\frac{180}{\pi}r$
Finding radians: $r=\frac{\pi}{180}d$
These equations are simply derived from the first ratio.
It doesn't only need to be $\frac{\pi}{180}$, it can also be setup as:
$\frac{360}{d}=\frac{2\pi}{r}$
Because it is also known that $2\pi$ radians is a full revolution about the circle just as 360 degrees is.