Math Behind Creating a "Perfect" Star I am busy looking to create star paths in my app, and I was wondering how to determine the ratio between the inner radius and the outer radius of the points of a star so that the star has "straight" lines across.

I have a function that takes 3 parameters:

pointCount = 5
outerRadius = 100
innerRadius = 50


Basically it goes around the circle and alternates between a point and an inside so the star looks like this:



As you can see, the star is "bulging". What I am really trying to get is this star:



There should be some mathematical formula that can take the "outer" radius and the number of points to calculate the "inner" radius?

innerRadius = some_operation (pointCount, outerRadius)
I think you are trying to draw a pentagram. While the linked page has many properties of that shape, some of them which would be of interest to you are:
$$R = \sqrt{\frac{1}{10}\big(25 - 11\sqrt{5}\big)} \\
\rho = \sqrt{\frac{1}{10}\big(5 - \sqrt{5}\big)}$$
where $R$ is the inner radius and $\rho$ is the outer radius. This assumes that the long edges of the star are of length 1.

You could always scale these numbers if the edges are not of length 1. But as you're interested in the ratio, we have
$$\frac{\rho}{R} = \sqrt{\frac{5 - \sqrt{5}}{25 - 11\sqrt{5}}} = \frac{3 + \sqrt{5}}{2}$$
In addition to being a surprisingly clean simplification, note that the ratio is $\phi + 1$ where $\phi$ is the famous golden ratio!
Star has $n$ points. The outer points of the star are $(x_k, y_k) =(\cos \frac {2\pi*k}n, \sin \frac {2\pi*k}n)$.  $(x_k, y_k)$ connects to $(x_{k+2\%n},y_{k+ 2\%n})$.

So formula for the line  $(x_k, y_k)-(x_{k+2\%n},y_{k+ 2\%n})$ is:

$y = \sin \frac {2\pi*k}n + (x - \cos \frac {2\pi*k}n)\frac{\sin \frac {2\pi*(k+2) \%n}n-\sin \frac {2\pi*k}n}{\cos \frac {2\pi*(k+2) \%n}n-\cos \frac {2\pi*k}n}$

and the formula for line $(x_{k-1\%n},y_{k-1\%n})-(x_{k+1\%n},y_{k+ 1\%n})$ is:

$y = \sin \frac {2\pi*(k-1\%n)}n + (x - \cos \frac {2\pi*k}n)\frac{\sin \frac {2\pi*(k+1\%n) \%n}n-\sin \frac {2\pi*(k-1\%n)}n}{\cos \frac {2\pi*k+1 \%n}n-\cos \frac {2\pi*(k-1\%n)}n}$

Calculate the point of intersection (thank god for machines)

Use the distance formula to find distance between to out points and these inner point of intersect.  (Did I say thank god for machines?  Let me say it again.)

If you just want the distance I suggest you do $k = 0$.