## Approximating Pi Using A Circle And A Square

Pi day was a few weeks ago, but I came across this simple approximation of pi recently and decided to put together an example in PHP since it seemed pretty simple.

This approximation of pi centers around a real world example, but we can simulate this using some code.

Let's say you have a dart board that fits inside a square area so that it is flush with the outside of the square. Then you pick someone who is particularly bad at darts and get them to start throwing darts. Record where the darts hit and after a million or so darts you will have a number of darts that hit the board and a number of darts that hit the background.