Suppose we have a floor made of parallel strips of wood, each the same width, and we drop a needle onto the floor. What is the probability that the needle will lie across a line between two strips? Wikipedia
Project architecture mainly based on Yet Another And Really Basic Webpack ES6 Starterkit.
Clone this repository locally...
$ git clone https://github.com/jonathanlinat/es6-experiments-series-buffons-needle.git
$ cd es6-experiments-series-buffons-needle/
...and install the required NPM packages.
$ npm install
Start a local Web Server.
$ npm run dev
Create a Production version of the project.
$ npm run build
The compiled version of the project will be available into the dist
folder.
It is also possible to lint code.
$ npm run lint
When a local Web Server is created and a new tab in your browser is opened, discover what's the Magical Number.
Press the F5
key in order to regenerate the needles and vertical lines.
- Webpack 4
- ES6 Support via babel-loader
- SASS Support via sass-loader
- Linting via eslint-loader
- JavaScript Standard Style via eslint-config-standard