🤙
Aspiring functional programmer and clean code aficionado
- Toulouse, France
Pinned Loading
-
-
-
Calculate pi using random numbers be...
Calculate pi using random numbers between 0 and 1 1/* Using a function that generates random values spread uniformly between 0 and 1, we can create
2random x and y positions for points on a square with left-bottom corner origin 0,0
3having width and height = r = 1
4So we now have points spread uniformly inside a square. We can use origin 0,0 as the origin
5for a circle of r = 1. If we use the ratio of points inside that circle vs. points inside the
-
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.