Description Usage Arguments Value Examples
This function simulates the mathematics problem, Buffon's needle, proposed by Georges-Louis Leclerc, Comte de Buffon.
1 | buffon(drops, w = 2, n = 1)
|
drops |
The number of needle drops to simulate. |
w |
The width of the boards or distance between lines. |
n |
The length of the needle. |
A rational approximation of π, calculated as drops / hits.
1 | buffon(10000)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.